Hi
I hope somebody can help me because I really don’t know how to solve this
problem.
I want to do the following.
We have an IIS server that I want to administrate using ADSI. I did some
testing in a test domain and everything went well. This because me user
was an administrator on the server.
Now I want to do the same on a server that we have in our real domain.
My user is not an administrator on that machine.
I have been reading Q218497 where they explain that calling the API
LogonUser I can impersonate an user that is an administrator and then
connect to the server with ADSI.
That is exactly what i tried. But it doesn’t work. I call the LogonUser with
LogonType LOGON32_LOGON_INTERACTIVE so that I can make calls to remote
systems.
But when connecting to the IIS it keeps throwing an "Access denied". I
tried several ways to impersonate the user, but none of them worked.
When calling the System.Security.Principal.WindowsIdentity.GetCurrent.Name it
returns me the administrator user so the impersonate seems to be working.
I hope somebody has an answer for me.
Thanks
Richard
Willy Denoyette [MVP] - 01 May 2005 21:17 GMT
You don't need to impersonate an Interactive user, this is only needed for
interactive logons.
And you need to impersonate a local administrator (loal means the IIS
server) or a domain administrator for this to work.
Willy.
> Hi
> I hope somebody can help me because I really don’t know how to solve
[quoted text clipped - 27 lines]
>
> Richard