MVC - Forms Authentication - 401.2

4

I am trying to setup FormsAuth for my MVC app. When I browse to the login action (which has the AllowAnonymous attribute, I get a 401.2 error. My web.config has:

<authentication mode="Forms">
  <forms loginUrl="~/Account/Login" timeout="2880" />
</authentication>
<authorization>
  <allow users="*" />
</authorization>

My IIS authentication settings for the web app have Forms Auth and Anon Auth enabled the others (including Windows Auth) are disabled.

There are no web.configs in any parent directories overriding the settings.

As per the help screen, I have tried all the suggestions:

Causes No authentication protocol (including anonymous) is selected in IIS. - Forms and Anon are enabled Only integrated authentication is enabled, and a client browser was used that does not support integrated authentication. - Not the case Integrated authentication is enabled and the request was sent through a proxy that changed the authentication headers before they reach the Web server. - Not the case The Web server is not configured for anonymous access and a required authorization header was not received. - Anon is enabled The "configuration/system.webServer/authorization" configuration section may be explicitly denying the user access. - Set to allow all

Things To Try Verify the authentication setting for the resource and then try requesting the resource using that authentication method. - Done Verify that the client browser supports Integrated authentication. - Using Chrome, other sites work Verify that the request is not going through a proxy when Integrated authentication is used. - No proxy Verify that the user is not explicitly denied access in the "configuration/system.webServer/authorization" configuration section. - Verified Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here. - When I run this I get "AUTH_INVALID_ANON_ACCOUNT" error: Logon failure: unknown user name or bad password. (0x8007052e).

Any ideas? I've googled this for quite a bit, but canno't find a solution.

I've also tried changing the app pool to an app pool of a web app that I know works (with the same settings). Still failed.

It works fine with IIS Express

asp.net-mvc
forms-authentication
http-status-code-401
asked on Stack Overflow Jan 30, 2014 by user472292 • edited Jan 30, 2014 by tereško

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0