WMI in ASP fails on 2003 (err 80041003); works fine on 2000
From: Jeff Davis (scripting-Remove.Please_at_foundations.com)
Date: 09/06/04
- Next message: JMS: "Re: Strange WMI Activities observed in Windows XP - disrupting .NE"
- Previous message: Jimmy B: "Re: Monitoring WMI calls"
- Next in thread: Gerry Hickman: "Re: WMI in ASP fails on 2003 (err 80041003); works fine on 2000"
- Reply: Gerry Hickman: "Re: WMI in ASP fails on 2003 (err 80041003); works fine on 2000"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 5 Sep 2004 22:21:47 -0700
Hi all...here's hoping you can help!
I've searched and seen several threads about problems with using WMI within
ASP pages. None of the threads, though, seem to answer my specifc questions.
So here goes...
Take a simple ASP page:
------------Begin Code------------
<%
Set objOS =
GetObject("winmgmts://server1.test.com").InstancesOf("Win32_OperatingSystem")
For Each obj In objOS
Response.Write (obj.name)
Next
%>
------------End Code------------
Slap this on a Windows 2000 Server SP4 running IIS 5, and all is well. I've
tested it on two servers with no problems.
Move the same page to either of 2 2003 servers running IIS 6.0, and I get
the infamous error:
------------Begin output------------
SWbemServicesEx error '80041003'
Access denied
------------End Output------------
Now, all servers are configured to disallow anonymous authentication, and I
am indeed being logged into the 2003 servers with an administrative account.
Note that the same code runs just fine on the 2003 servers as a standalone
VBScript.
Now, I can make it work by configuring the WMI call to use delegation, like
so:
------------Begin Code------------
<%
Set colProc =
GetObject("winmgmts:{impersonationlevel=delegate,authority=kerberos:server1}!//server1.test.com/root/cimv2").InstancesOf("win32_Process")
For Each obj In objOS
Response.Write (obj.name)
Next
%>
------------EndCode------------
So here are my questions:
1. Why? Why must I use delegation with Windows 2003/IIS6 and not with
Windows 2000/IIS5? What's different about IIS6 that hosing me so? Why would
delegation be needed at all (script is initiated on IIS server via
interactive logon - thus WMI to remote machine should be a single hop)
2. Is there a way to avoid the need for delegation on 2003? The problem is
that I want to have the ASP page be able to hit pre-2000 boxes, which aren't
going to support Kerberos and delegation.
Thanks,
Jeff
- Next message: JMS: "Re: Strange WMI Activities observed in Windows XP - disrupting .NE"
- Previous message: Jimmy B: "Re: Monitoring WMI calls"
- Next in thread: Gerry Hickman: "Re: WMI in ASP fails on 2003 (err 80041003); works fine on 2000"
- Reply: Gerry Hickman: "Re: WMI in ASP fails on 2003 (err 80041003); works fine on 2000"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|