I'm trying to get the local user, but I have no return.
- WebApi
- IIS (10) Windows 10
My IIS Enabled:
- Windows
- Basic
- Anonymous
Visual Studio 2017 C# .net 4.6.1
I already tried to tag the web config:
<authorization>
<allow users="?" />
</authorization>
AND
<identity impersonate="false" />
<authentication mode="Windows" />
Code WebApi
[HttpGet]
[Authorize]//I already tried [AllowAnonymous]
public User Get()
{
System.Net.NetworkCredential SystemCredential = (System.Net.NetworkCredential)ADUtil.SystemCredential();
string login = HttpContextUtil.Request.LogonUserIdentity.Name;
error here, login return 'NT AUTHORITY\IUSR'.
}