G
Guest
Hi anyone.
Does anyone know of issues regarding impersonation in VB .NET with regards
to accessing remote WMI information?
I have a wrapper class which encapsulates various WMI calls, this appeared
fine under .net 1.1, but since sp1 it appears to not work. I have switched
on the debug level to 2 (for WMI) on the machines i am querying, and they are
showing access denied due to the ASPNET user of the local machine making the
query. The web server has been set to require authentication, i have set
impersonation=true in the web.config, and then i am using the following code
(from MSDN i think) to impersonate the logged on user to run the WMI queries:
Dim impersonationContext As
System.Security.Principal.WindowsImpersonationContext
Dim currentWindowsIdentity As System.Security.Principal.WindowsIdentity
currentWindowsIdentity = CType(User.Identity,
System.Security.Principal.WindowsIdentity)
impersonationContext = currentWindowsIdentity.Impersonate()
anyone having anything like this? i am hitting a dead end......
cheers
Does anyone know of issues regarding impersonation in VB .NET with regards
to accessing remote WMI information?
I have a wrapper class which encapsulates various WMI calls, this appeared
fine under .net 1.1, but since sp1 it appears to not work. I have switched
on the debug level to 2 (for WMI) on the machines i am querying, and they are
showing access denied due to the ASPNET user of the local machine making the
query. The web server has been set to require authentication, i have set
impersonation=true in the web.config, and then i am using the following code
(from MSDN i think) to impersonate the logged on user to run the WMI queries:
Dim impersonationContext As
System.Security.Principal.WindowsImpersonationContext
Dim currentWindowsIdentity As System.Security.Principal.WindowsIdentity
currentWindowsIdentity = CType(User.Identity,
System.Security.Principal.WindowsIdentity)
impersonationContext = currentWindowsIdentity.Impersonate()
anyone having anything like this? i am hitting a dead end......
cheers