Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Retrieve the windows login user using Forms authentication

$
0
0

I'm working on an ASP.NET application running on our intranet. We are using forms authentication, however the usernames set up will be the same as the Active Directory usernames. I'm trying to find a way to pre-populate the login username field with the Windows username, but can't find a way to access the current Windows user identity.

System.Environment.UserDomainName
 returns "IIS APPPOOL"

System.Security.Principal.WindowsPrincipal.Current.Identity
 returns a GenericIdentity

HttpContext.Request.LogonUserIdentity.Name
 returns "NT AUTHORITY\IUSR"

I want to authenticate the Windows user or login to the website . Is there any way to do this whilst using Forms Authentication rather than Windows Authentication?

 


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>