Unable to get windows login name of the user? <p>In my ASP.NET application deployed on an intranet, I am using something like this in a Web Service to get the Windows Login of the current user:</p> <pre><code>string user = User.Identity.Name.ToString(); </code></pre> <p>and added the following to my <code>Web.config</code> file:</p> <pre><code>&lt;system.web&gt; &lt;authentication mode="Windows" /&gt; &lt;identity impersonate="false" /&gt; &lt;/system.web&gt; </code></pre> <p>This works when I deploy my site locally but does not work when I publish it and use an actual URL (not the localhost) to access it. Am I missing something? I want to get the Windows Login name of the user currently accessing my website. Any suggestions?</p>