AppFriendlyName not applying

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

Hi Guys,

I'm trying to set the property of AppFriendlyName to a
IIsWebServerSetting class in an IIsWebServer. However, when I take a
look in IIS manager, under the AppPool tree it just says "ROOT" instead
of the name I have specified.

*****************************************
string theDomain = "test.com";

// Default path specifies server and service.
ManagementPath thePath = _defaultPath.Clone();
thePath.RelativePath = "IIsWebServer='W3SVC/3'";
thePath.ClassName = "IIsWebServerSetting";
ManagementObject siteSettings = new ManagementObject(thePath);

// testAppPool exists, and site is added with name as "ROOT".
theProperties["AppPoolId"].Value = "testAppPool";

// Dosen't appear to get applied, name stays as "ROOT".
siteSettings.Properties["AppFriendlyName"].Value = theDomain;

// This line throws no exceptions.
siteSettings.Put();
*****************************************

Any ideas people?
 
Another thaught, the actual site description isn't being set either.
Does anybody know what property I should use for that?
 
Nick said:
Another thaught, the actual site description isn't being set either.
Does anybody know what property I should use for that?

Did you refresh the view in IIS Manager?

Willy.
 
Yeah, I've even added additional sites to the testAppPool using my
code, however they all display as "ROOT"; for example...

[ - ] Appliction Pools
| [ - ] DefaultAppPool
| |------ Default Application
| [ - ] testAppPool
| |------ ROOT
| |------ ROOT

I can successfully enter an "Application Name" in the Home Directory
tab using the IIS manager, which displayes appropriately. However, in
this case that's not really an option.

Nick
 
Back
Top