PDA

Click to See Complete Forum and Search --> : [RESOLVED] [2.0] enable application name


popskie
Mar 22nd, 2007, 02:21 AM
Hi,

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

penagate
Mar 22nd, 2007, 03:03 AM
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.

popskie
Mar 22nd, 2007, 03:34 AM
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

Harsh Gupta
Mar 22nd, 2007, 08:15 AM
check the attached application

popskie
Mar 22nd, 2007, 09:20 PM
Thanks HG

newChild.Invoke("AppCreate", true);

Above line solved my problem.