1 Attachment(s)
[RESOLVED] [2.0] enable application name
Hi,
Code:
site.Invoke("Put", "ServerComment", name);
site.Invoke("Put", "KeyType", "IIsWebServer");
site.Invoke("Put", "ServerBindings", "10.254.104.199:" + port.ToString() + ":hostname.com");
site.Invoke("Put", "AppPoolId", "MSSharePointPortalAppPool");
site.Invoke("Put", "ServerState", 1);
//site.Invoke("Put", "FrontPageWeb", 1); comment by me
//site.Invoke("Put", "Default.htm", "Default.asp", "index.htm", "iisstart.htm", "Default.aspx");
site.Invoke("Put", "SecureBindings", ":443:"); // ssl
site.Invoke("Put", "ServerAutoStart", 0);
site.Invoke("Put", "ServerSize", 1);
site.Invoke("SetInfo");
// Create the application virtual directory
//DirectoryEntry Parent = new DirectoryEntry(@"IIS://localhost/W3SVC/" + ServerId.ToString() + "/Root");
DirectoryEntry siteVDir = site.Children.Add("root", "IIsWebVirtualDir");
siteVDir.Properties["AppIsolated"][0] = 2;
siteVDir.Properties["Path"][0] = homeDirectory;
siteVDir.Properties["AccessFlags"][0] = 513;
//siteVDir.Properties["FrontPageWeb"][0] = 1; comment by me
siteVDir.Properties["AppRoot"][0] = "/LM/W3SVC/" + siteID + "/root";
siteVDir.Properties["AppFriendlyName"][0] = "Default Application";
siteVDir.CommitChanges();
site.CommitChanges();
Thats my code in creating a website . My question is how to enable the application name textbox programmatically.
thanks,
Popskie
Re: [2.0] enable application name
I don't believe you can do it through code as it's an IIS setting and not to do with your project. Could be wrong, though.
Re: [2.0] enable application name
Quote:
Originally Posted by penagate
I don't believe you can do it through code as it's an IIS setting and not to do with your project. Could be wrong, though.
thanks penagate for the reply. So I should manualy click the create button manually.
Thanks,
Popskie
1 Attachment(s)
Re: [2.0] enable application name
check the attached application
Re: [2.0] enable application name
Thanks HG
newChild.Invoke("AppCreate", true);
Above line solved my problem.