Current Identity without being impersonated

  • Thread starter Thread starter despird
  • Start date Start date
D

despird

System.Security.Principal.WindowsIdentity.GetCurrent() can give me the
current logged-on user, but I found if I'm using impersonation in the
context, it can only give me the user identity who's being
impersonated rather than the real logged user on the Windows, what if
I want the latter?
 
You could get it before impersonation and save this info ?

Some more details about the context could help (what kind of app is this.
You impersonate in code ?)
--
Patrice

"despird" <[email protected]> a écrit dans le message de groupe de
discussion :
(e-mail address removed)...




- Show quoted text -

Hi Patrice, thanks for your reply, I impersonate in Web.Config, so how
should I save it before impersonation?
 
What if you try System.Web.HttpContext.Current.User.Identity.Name instead
for ASP.NET ?

--
Patrice

"despird" <[email protected]> a écrit dans le message de groupe de
discussion :
(e-mail address removed)...





- Show quoted text -

System.Web.HttpContext.Current.User.Identity.Name gives me the loggon
user for the web application rather than a Windows identity as I'm
using Form authen rather than windows authen.
 
Back
Top