T
TS
In these 2 snippets, "user" references 2 different things in my app:
-------------------------------------------------
Dim ident As System.Security.Principal.WindowsIdentity =
System.Security.Principal.WindowsIdentity.GetCurrent()
Dim User As New System.Security.Principal.WindowsPrincipal(ident)
&
HttpContext.Current.User
-------------------------------------------------
I'm using impersonation, and the first snippet's user.identity.name is the
name of my impersonated account. In the 2nd snippet, the user.identity.name
is my windows logged on account
I have impersonation on, but if I didn't, I guess the first snippet's
user.identity.name would point to the ASPNET worker process, or would it
mimick the 2nd code snippet
Then we have System.Threading.Thread.CurrentPrincipal.Identity, which seems
to always point to the windows logged on account.
Can you please decipher these different forms of querying
thanks
-------------------------------------------------
Dim ident As System.Security.Principal.WindowsIdentity =
System.Security.Principal.WindowsIdentity.GetCurrent()
Dim User As New System.Security.Principal.WindowsPrincipal(ident)
&
HttpContext.Current.User
-------------------------------------------------
I'm using impersonation, and the first snippet's user.identity.name is the
name of my impersonated account. In the 2nd snippet, the user.identity.name
is my windows logged on account
I have impersonation on, but if I didn't, I guess the first snippet's
user.identity.name would point to the ASPNET worker process, or would it
mimick the 2nd code snippet
Then we have System.Threading.Thread.CurrentPrincipal.Identity, which seems
to always point to the windows logged on account.
Can you please decipher these different forms of querying
thanks