-1

Possible Duplicate:
MVC Forms LoginUrl is incorrect

I have deployed the simple mvc 3 to IIS 7.5. The register redirect url is /Account/LogOn?ReturnUrl=%2fAccount%2fRegister. It does not redirect to registration web page.

It seems like the Logon problem as the thread: MVC Forms LoginUrl is incorrect

Community
  • 1
  • 1
Gary
  • 1
  • **Thanks for the kindly responses**. I try remove all reference and add again. It is **solved**. No extra configuration on web.config. It work well now. – Gary Sep 26 '11 at 14:56

2 Answers2

0

From ASP.NET MVC 3 Release Notes :

There’s a known issue that causes Forms Authentication to always redirect unauthenticated users to ~/Account/Login, ignoring the forms authentication setting used in Web.config. The workaround is to add the following app setting.

<add key="autoFormsAuthentication" value="false" />

Check yourself out :

http://www.asp.net/learn/whitepapers/mvc3-release-notes#0.1__Toc274034230

tugberk
  • 57,477
  • 67
  • 243
  • 335
0

What comes to mind is if you have checked if your register method is without the AuthorizeAttribute? Maybe you've put the AuthorizeAtrtribute on top of the controller or you you've created a BaseController with the attribute, so every controller deriving from it need the user to be authenticated

Iridio
  • 9,213
  • 4
  • 49
  • 71
  • Thanks for quick response. I have checked it. There is not AuthorizeAttribute and BaseController I derived. – Gary Sep 26 '11 at 14:21