#32 Fix Access Denied - WMI ApplicationPool Remote Management

open
nobody
None
5
2007-12-20
2007-12-20
No

There has been a change in the IIS WMI provider for Windows Server 2003 SP 1
and Windows XP SP2 that requires customers to update WMI-based scripts that
operate over a remote connection. Network encryption for WMI is on by default.
If you create an application or script that is intended to administer IIS on a
remote computer running Windows Server 2003 SP1 or later, you must use the
AuthenticationLevel property. WMI-based scripts that do not encrypt the connection
when administering IIS remotely fail with an Access Denied error (WBEM_E_ACCESS_DENIED, 0x80041003).

http://msdn2.microsoft.com/en-us/library/ms525413.aspx
http://msdn2.microsoft.com/en-us/library/system.management.connectionoptions.authentication.aspx

When Creating a ManagementScope to IIS, AuthenticationLevel.PacketPrivacy must now be used.

Changed File: \src\Tasks\Web\ApplicationPool.cs

Old:

private ManagementScope Scope {
get {
return new ManagementScope (@"\\" + Server + "\\root\\MicrosoftIISv2");
}
}

New:

private ManagementScope Scope {
get {
ConnectionOptions options = new ConnectionOptions();
options.Authentication = System.Management.AuthenticationLevel.PacketPrivacy;

return new ManagementScope (@"\\" + Server + "\\root\\MicrosoftIISv2", options);
}
}

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks