If you have disabled anonymous authentication HttpContext.Current.Request.LogonUserIdentity.Name
will return the domain and username of the logged in user.
Get username used for IIS protected directory login
-
05-07-2023 - |
Domanda
Situation: Multiple user accounts are created for access to a directory using IIS directory protection. Once a user successfully logs in, is it possible to obtain the username they used with ASP/VB/.NET/etc.?
Or is the only alternative for identifying users to use a separate database-backed system of accounts and credentials?
Thanks for your time!
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow