Is there a way to retrieve a client's Windows username in ASP.NET when hosted on a remote server without using an ActiveX object?
I tried the following code:
Response.Write("HttpContext.Current.Request.LogonUserIdentity.Name " & HttpContext.Current.Request.LogonUserIdentity.Name)
Response.Write("<br/>")
Response.Write("HttpContext.Current.Request.IsAuthenticated " & HttpContext.Current.Request.IsAuthenticated)
Response.Write("<br/>")
Response.Write("HttpContext.Current.User.Identity.Name " & HttpContext.Current.User.Identity.Name)
Response.Write("<br/>")
Response.Write("System.Environment.UserName " & System.Environment.UserName)
Response.Write("<br/>")
Response.Write("Security.Principal.WindowsIdentity.GetCurrent().Name() " & System.Security.Principal.WindowsIdentity.GetCurrent().Name())
Response.Write("<br/>")
However, this code always returns the server username instead of the client's username.