It works locally but when I upload my website to an IIS server then it wont work: this is part of my config file which I thought it would work:

```
<authentication mode="Windows">
</authentication>
<identity impersonate="true"/>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>

```

My asp.net code which works locally but not on server:

```
 string[] temp = Convert.ToString(System.Security.Principal.WindowsIdentity.GetCurrent().Name).Split('\\');
 string userName = temp[1] + "@" + temp[0];
 Console.WriteLine("name: "+ userName);

```

The name/error which is saved is 

```
NT AUTHORITY\IUSR

```

**Im using windows server 2012 version 6.2**
How can I get the windows users name?