views:

398

answers:

1

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?

+3  A: 

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
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/890015I'd appreciate any other thoughts.
Buggieboy