Hello,
When I debug my website locally using IIS Express + Windows Authentication, my authorization and custom Roles work correctly - my domain\username shows up by using Environment.UserDomainName and Environment.UserName, and my [Authorize(Roles = "MyCustomRole")]
works along with the User.IsInRole calls in Razor.
But when I deploy my website to a production IIS 7.5 instance, my domain\username shows up as NT Authority\Local System (or something like that, at home at the moment so I can't verify the exact text, but that's close). Also, none of my User.IsInRole checks
work, and my [Authorize] attributes do not work either. I've followed lots of setup docs regarding IIS 7.5 and Windows Authentication with ASP.NET, but it doesn't seem to be holding. Any ideas?
...
Go to the complete details ...