I created a site. It is an internal site. It is a .NET 4.0 site. I would like to grab the username using HttpContext.Current.User.Identity.Name of the person browsing the site. There isnt a login page since it is internal. I am not sure what I am missing. Do I need the following in my webconfig:
<authentication mode="Windows"></authentication>
<identity impersonate="true"/>
<authorization>
<allow users="?"/>
</authorization>
and this:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
It comes up blank when unauthenticated. You can verify this by also doing:
Check your authentication level in IIS, is it set to enable windows authentication there too?