Question

In a .NET MVC4 application, access to controller are restricted by Authorize attribe.

[Authorize(Users = @"network-domain\-some-user-")]
[Authorize(Users = @"network-domain\-some-group")]

When publish on the server it seems to work fine.

On my development computer on the same network, I cannot get identified as a uaser. In IIS, if Windows Authentication is enabled and Anonymous Authentication is disabled for the application, the browser keeps asking for login password again and again. No user can access it, even authorized users.

(Tried with FireFox and Internet Explorer.)

Maybe this is more an identification/browser problem.

How can I get identified as a user on my development computer

Was it helpful?

Solution

I had the same issue on my localhost. The problem is with hosts file. Some sort of security issue with hosts file vs windows auth. Access your site via localhost:port and win auth should work locally.

See my exactly the same question here: https://stackoverflow.com/a/20723552/809357

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top