M
Mark
We'd like to capture the windows account of the current web user. In our
code-behinds, this is cake using:
System.Security.Principal.IIdentity ii = User.Identity;
Reponse.Write("User: " + ii.Name);
However, we have a global error hander in the Global.asax Application_Error
event that it doesn't work so hot in. This is due to the fact that the User
class above is available only through the Page class. The global.asax isn't
a page, so it doesn't have access to User. Is there a way around this?
Note - we can't use WindowsPrincipal or WindowsIdentity because we're using
Impersonation to connect to SQL Server.
The WindowsPrincipal would give us the wrong user.
Thanks in advance!
Mark
code-behinds, this is cake using:
System.Security.Principal.IIdentity ii = User.Identity;
Reponse.Write("User: " + ii.Name);
However, we have a global error hander in the Global.asax Application_Error
event that it doesn't work so hot in. This is due to the fact that the User
class above is available only through the Page class. The global.asax isn't
a page, so it doesn't have access to User. Is there a way around this?
Note - we can't use WindowsPrincipal or WindowsIdentity because we're using
Impersonation to connect to SQL Server.
The WindowsPrincipal would give us the wrong user.
Thanks in advance!
Mark