1

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.

Lior Ohana
  • 3,467
  • 4
  • 34
  • 49
  • Check this answer: http://stackoverflow.com/q/4593412/114029 – Leniel Maccaferri Feb 22 '12 at 16:29
  • Leniel: Thanks but the answers in the post does not solve the problem. One of them is using the DirectoryServices as I do and the second one is trying to use the FileSystem but it doesn't really work in all cases. – Lior Ohana Feb 23 '12 at 08:40

0 Answers0