|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Impersonation questiondiscover the current user's Windows logon name. To do this, I've created a web.config with these contents (from another post seen here): <configuration> <system.web> <identity impersonate = "true"/> </system.web> </configuration> Then in my web page, I can print the username with: <% =System.Security.Principal.WindowsIdentity.GetCurrent().Name %> My question is, if I use this technique, is the whole ASP.Net page running in the context of the logged in user instead of ASPNET? If so, is there another way I can get at the logged in user name without turning on impersonation for the whole session? Thanks, Matt Hello mjp***@yahoo.com,
yes. you don't have to use impersonation to accomplish that. Your clients identity is store in Page.User, e.g. Response.WriteLine(Page.User.Identity.Name); --------------------------------------- Dominick Baier - DevelopMentor http://www.leastprivilege.com Show quoteHide quote > I need to write a simple ASP.Net application. In it, I need to > discover the current user's Windows logon name. To do this, I've > created a web.config with these contents (from another post seen > here): > > <configuration> > <system.web> > <identity impersonate = "true"/> > </system.web> > </configuration> > Then in my web page, I can print the username with: > > <% =System.Security.Principal.WindowsIdentity.GetCurrent().Name %> > > My question is, if I use this technique, is the whole ASP.Net page > running in the context of the logged in user instead of ASPNET? If > so, is there another way I can get at the logged in user name without > turning on impersonation for the whole session? > > Thanks, > Matt
session manager vs Form authentication in the Global.asax.cs file
User.IsInRole is always FALSE User Identity Multi-Domain Authentication for Windows Services WS Security issues Newbie Question - List of all available hash algorithms? DPAPI Decryption on different machine Set concurrent connections on share MemoryStream requires FileIOPermission ??? Bad Data CryptographicException when RSA decrypting |
|||||||||||||||||||||||