user2607683
user2607683

Reputation: 1

Authentication Require Enter username and password to http://www

I am getting window authentication window popup on some of my views in mvc4. It works fine when I host it on local server. But when I upload my code to my hosting server, all the views works fine except some views.

I am using form authentication in my application. And the views which given me such popups their controller class define with [Authorize] attribute. Is it an issue with IIS on hosted server or something else?

This is the popup message:

http://postimg.org/image/4slwg6ywx/

Upvotes: 0

Views: 4563

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1039508

I suspect that you have Integrated Windows Authentication or Basic Authentication configured in IIS for your website or application (depending on how you are hosting it). Make sure you disable it and enable anonymous access to the website if you want to use Forms Authentication.

  1. Open IIS Manager and navigate to your website or application.
  2. In Features View, double-click Authentication.
  3. On the Authentication page, disable Windows authentication and enable Anonymous authentication.

Upvotes: 1

Related Questions