Groups | Blog | Home
all groups > asp.net security > may 2008 >

asp.net security : Identity Impersonate (Rephrase)



Jon Mcleod
5/21/2008 2:35:06 AM
Hello..

I'm using windows integrated security, with the following web.config:

<authentication mode="Windows"/>
<identity impersonate="true" userName="netuser" password="p"/>

In my app, I am trying to figure out who is the actual human user
sitting at the keyboard. With WindowsIdentity, I can find out all there
is to know about the "netuser" account, but I need to know the signin
name of the user who is actually logged into the domain.

Is this possible?

Joe Kaplan
5/21/2008 9:50:31 AM
Context.User contains the identity of the user authenticated by the web
application. The impersonate tag in the web.config controls what Windows
identity the current thread executes under. Depending on how you have it
configured, it could be one of three things:
- Impersonation "off": thread identity is the worker process identity
(usually NETWORK SERVICE)
- Impersonation "on": thread identity is the identity of the authenticated
user unless anonymous auth is enabled in IIS
- Impersonation "on" with credentials specified: thread identity is the
identity specified in the impersonate tag regardless of the user
authenticated by the web app

Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
[quoted text, click to view]

AddThis Social Bookmark Button