Question

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!

Was it helpful?

Solution

If you have disabled anonymous authentication HttpContext.Current.Request.LogonUserIdentity.Name will return the domain and username of the logged in user.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top