How to get current Windows Login Name in C# Web APP?
Try Page.User.Identity.Name
. This should be what you're looking for. This property is derived from HttpContext
and represents the logged in user security information for the current HTTP request.
If the result is null, then I would suspect that the IIS settings is not configured properly. Try the advice in the following links:
http://forums.asp.net/t/1689878.aspx/1
HttpContext.Current.User.Identity.Name is Empty