title: How to get current user who's accessing an ASP.NET application?
body: <p>To get the current logged in user at the system I use this code:</p>
  
  <pre><code>string opl = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
  </code></pre>
  
  <p>I work on an ASP.NET application where I need this information. So I've put my application on a server and tried the code above, and I get "Network Service" in the string opl. I need to know the current user of the PC who accesses my ASP.NET application.</p>