WMI - could not create object winmgmts




Hi,

Trying to get WMI via ASP or ASPX to work on a remote W2003 server to
monitor network performance. Have tried simple code in both asp & aspx
but always fails with a message "could not create object of type
"winmgmts:{impersonationLevel=Impersonate}!\\.\root\comv2".

The folder where the asp/aspx page resides is protected and demands a
login/pwd, so I thought the "imppersonate" would take the permissions
of the login - true?

In Computer Management : WMI Control I gave full permissions to this
login/pwd for root/CIMV2.

DCOM for WMI has launch permissions Everyone, and Access Permissions
are allowed for that login/pwd.

The code is the standard:
strComputer = "."
strWMIService = "winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2"
set objWMIService = Server.CreateObject(strWMIService)

(without the word "set" for the aspx page)

thx



--
slowtalkinjones
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

.



Relevant Pages

  • Can I write WMI code in aspx with C#?
    ... My company plan to migrate all the script from asp with VB to aspx with C#. ... Can I write WMI in C# in a .cs file and call it from a .aspx file? ...
    (microsoft.public.win32.programmer.wmi)
  • Re: WMI wouldnt start. My fix.
    ... >it) that WMI was dependent on it, ... >On the launch permissions, where you have ... the Default Com Security tab is now called ... remember to click OK on the relevant window) ...
    (microsoft.public.windowsxp.wmi)
  • RE: Event ID: 10 WinMgmt error generated every 30 sec, any idea?
    ... 828653 Large WMI notification query may cause a quota violation ... group whose permissions you want to modify in the Group or user names list. ... Permits full read, write, and delete access to all WMI objects, ... click to check the "Hide All Microsoft Services" ...
    (microsoft.public.windows.server.sbs)
  • Re: WMI wouldnt start. My fix.
    ... Event Log initially showed (when I started ... are times when WMI needs Event Log and times when it doesn't... ... On the launch permissions, ... Oh wait, you mentioned Windows Firewall... ...
    (microsoft.public.windowsxp.wmi)
  • Re: WMI Config Error Installing SQL2K5 Standard Edition
    ... After much searching I found a fix posted online that got me past this ... on another installation and he had called Microsoft Support about it. ... It turns out that something was screwy with WMI on my machine. ... To do step 2, right click on those registry keys, click Permissions, ...
    (microsoft.public.windowsxp.help_and_support)