Вопрос

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!

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top