Parameters for WebConfigurationManager.OpenWebConfiguration(RootVDir, SiteNumber)

I needed to open web.config file from the external application(setup utility).

I decided to use WebConfigurationManager.OpenWebConfiguration(path,site) function. 

In the documentation it is not clear, that path should started with ““ , e.g “MyWebApp“.Passing “MyWebApp“ without leading “” causes error.

If I want to use metabase site path (e.g “/LM/W3SVC/1”) instead of  name of the application Web site, I can to pass “1“ as site parameter and it is fully acceptable(but not documented). 

Advertisements