2

I have code that works on Win XP (IIS 5.1) and Win Server 2008 (IIS 7.0) but fails on the Windows 7 release candidate, which runs IIS 7.5.

I construct a new DirectoryEntry("IIS://localhost/w3svc"). The DirectoryEntry object returned by the constructor is no good. (Viewing members in debugger throws a COMException.)

Has anybody been working with IIS on Win 7 and found a resolution to this?

Helen
  • 87,344
  • 17
  • 243
  • 314
Buggieboy
  • 4,636
  • 4
  • 55
  • 79

1 Answers1

4

With Windows 2008, to use DirectoryEntry, you have to install an IIS Role called "IIS 6 Metabase Compatibility"

I don't know about Windows 7, I'm currently on Vista.

Edit: I found this

http://blog.scrappydog.com/2008/06/enabling-iis-6-metabase-compatibility.html

Kevin Doyon
  • 3,464
  • 2
  • 33
  • 38
  • I think you've got it, though I'm still having trouble. I installed the IIS 6 support, as you suggested. However, when I go into the IIS management console and try to start the default website, I get a message saying that a file can't be accessed because it's being used by another process. Supposedly, this means port 80 or port 443 is already in use, so I'm going down this road: http://support.microsoft.com/kb/890015 I'd appreciate any other thoughts. – Buggieboy Jul 13 '09 at 18:31