P
Peter Johansen
I'm trying to figure out a simple problem but I'm stumped. I have an
application that needs to access a .dll that (for security reasons) only
grants permissions to the Administrators group. Since the application pool's
identity is the default "Network Service", I was thinking I'll just
impersonate the "Administrator" account in my ASP.NET code.
Now, when I check the value of "WindowsIdentity.GetCurrent().Name" BEFORE
the identity switch it reports the identity as that of the anonymous
"MACHINE\IUSR_machine" account. When I check the same value right AFTER the
switch it reports "MACHINE\Administrator". So the identity switch seems to
be successful.
However, when I try to access the .dll right after that, I get the "Can't
create ActiveX object" error. That's because when I check access to the .dll
with FileMon it reports that it's still trying to access the .dll as the
"Network Service" user!
What am I missing? Why is it using the identoty of the application pool, and
NOT the impersonated identity for access to the .dll?
Thanks for any help!
application that needs to access a .dll that (for security reasons) only
grants permissions to the Administrators group. Since the application pool's
identity is the default "Network Service", I was thinking I'll just
impersonate the "Administrator" account in my ASP.NET code.
Now, when I check the value of "WindowsIdentity.GetCurrent().Name" BEFORE
the identity switch it reports the identity as that of the anonymous
"MACHINE\IUSR_machine" account. When I check the same value right AFTER the
switch it reports "MACHINE\Administrator". So the identity switch seems to
be successful.
However, when I try to access the .dll right after that, I get the "Can't
create ActiveX object" error. That's because when I check access to the .dll
with FileMon it reports that it's still trying to access the .dll as the
"Network Service" user!
What am I missing? Why is it using the identoty of the application pool, and
NOT the impersonated identity for access to the .dll?
Thanks for any help!