How to get machine account from which the user login to my application?
<p>How to get the user machine account from which he access the application in the case of <code>Form authentication</code> .</p>

<p>I use the following method but it doesn't get the required data:</p>

<pre><code>protected string[] TrackUser()
{
    System.Web.HttpContext context = System.Web.HttpContext.Current;
    string IP = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
    string compName = (Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName);
    string account = Request.ServerVariables["AUTH_USER"];
    string[] user_network_data = new string[3];
    if (!string.IsNullOrEmpty(IP))
    {
        string[] addresses = IP.Split(',');
        if (addresses.Length != 0)
        {
            IP = addresses[0];
        }
    }
    else
    {
        IP = context.Request.ServerVariables["REMOTE_ADDR"];
    }
    user_network_data[0] = IP;
    user_network_data[1] = compName;
    user_network_data[2] = account;
    return user_network_data;
}
</code></pre>
