Hi,
Thats my code in creating a website . My question is how to enable the application name textbox programmatically.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();
thanks,
Popskie


Reply With Quote
