I have exactly same problem as jrista. I had to test our software on Windows
2008 (with .NET 3.5 SP1). I’ve installed ‘IIS 6 Management Compatibility’ and UAC
is turned off. Our software is using quite same code as jrista
‘System.DirectoryServices’ and ADSI. I’ve tried 2 scenarios:
1) Run the code from my XP machine trying to manage IIS 7 on windows 2008
Server.
2) Run the code directly on Windows 2008.
In both scenarios I was using the same AD Account, which has administrative
rights on both machines. Results:
1) COMException: “Access is denied.”
(source: "System.DirectoryServices")
2) Test run successfully and I get
access to IIS7
I’ve tried also to run a VBScript also using ADSI:
dim websrv, site
set websrv = getobject("IIS://windows2008server/W3SVC")
for each site in websrv
if (site.classname = "IIsWebServer") then
WScript.echo Site.ServerComment & " (" & Site.Name & ")"
end if
next
And the curious thing is that vbs script works in both scenarios. Currently I
have no idea, how to get the 1 scenario running. I think it could be some kind of
.NET security problem. Thanks for any ideas.
_______________________________
lukas radwanski