Problem exclusively using Windows Authentication in ASP.NET MVC 3 Beta

后端 未结 3 894
悲&欢浪女
悲&欢浪女 2020-12-25 12:01

I\'m creating an Intranet site in ASP.NET MVC 3 Beta and would like to use Windows Authentication exclusively. In addition, I\'d like to use the Visual Studio Development Se

相关标签:
3条回答
  • 2020-12-25 12:20

    I had exactly the same problem. Turns out there was a change in MVC 3 (fairly well hidden, too) that has Forms authentication automatically enabled by default, in order to disable it add the following line to your root Web.config file, under the appSettings key...

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

    Hope that helps!

    0 讨论(0)
  • 2020-12-25 12:34

    Check if you have a WebMatrix.Data.dll at your bin. http://blog.fujiy.net/post/aspnet-mvc-windows-authentication-redirecionando-pro-login, http://blogs.catapultsystems.com/rhutton/archive/2012/07/20/mvc3-with-windows-authentication-redirected-to-accountlogin.aspx

    0 讨论(0)
  • 2020-12-25 12:44

    FYI, in case this helps others : In my case, I only had to add <add key="enableSimpleMembership" value="false"> to fix the issue and <add key="autoFormsAuthentication" value="false" /> was not required. I also found this blog post very useful as an explanation http://www.codeproject.com/Articles/292149/The-resource-cannot-be-found-Account-Login?msg=4092212#xx4092212xx

    Any thoughts on potential ramifications/side-effects of this fix?

    also I am disappointed this issue has not yet been fixed by ms after a year +.

    thanks.

    0 讨论(0)
提交回复
热议问题