Usually I use Request.LogonUserIdentity.Name to check ASP.NET Logon User. It works for all types of users.
System.Web.HttpContext.Current.User.Identity.Nameor
Request.ServerVariables["AUTH_USER"]
are only for Windows Authenticated user. For Internet users (anonymous guest), empty string is expected.
Request.LogonUserIdentity.Name will show you if the user is anonymous.
No comments:
Post a Comment