I'm working on an application which should add a vdir on the default web site. Before adding the vdir I need to check whether the default web site exists. The way I'm doing it today is using the DirectoryServices via c# (example).
The problem is that using the DirectoryServices on IIS7 is possible only when the IIS6 backwards compatibility roles are installed. I have no problem with creating the vdir since it is done after adding the IIS6 b/w compatibility roles (yes, the default web site test must be before :-) ).
Is there any alternative way for querying the IIS? Maybe through the registry/file system?
Thanks a lot.