Request redirect to /Account/Login?ReturnUrl=/ since MVC 3 install on server

前端 未结 14 1999
攒了一身酷
攒了一身酷 2020-12-04 08:51

We have an internal ASP.NET Webforms application running on a Windows 2008/IIS7 server which has been running fine until we installed MVC3.

Now any requests redirect

相关标签:
14条回答
  • 2020-12-04 09:29

    Just remove

     <authorization>
          <deny users="?"/>
        </authorization>
    

    from your web.config file

    that did for me

    0 讨论(0)
  • 2020-12-04 09:29

    A solve this adding in the option defaultURL the path my application

    <forms loginUrl="/Users/Login" protection="All" timeout="2880" name="001WVCookie" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="/Home/Index" cookieless="UseCookies" enableCrossAppRedirects="false" />
    
    0 讨论(0)
  • 2020-12-04 09:32

    I fixed it this way

    1. Go to IIS
    2. Select your Project
    3. Click on "Authentication"
    4. Click on "Anonymous Authentication" > Edit > select "Application pool identity" instead of "Specific User".
    5. Done.
    0 讨论(0)
  • 2020-12-04 09:34

    I solved the problem by adding the following lines to the AppSettings section of my web.config file:

    <add key="autoFormsAuthentication" value="false" />
    <add key="enableSimpleMembership" value="false"/>
    
    0 讨论(0)
  • 2020-12-04 09:35

    Open web.config,then Change

    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>
    

    To

    <authentication mode="Forms">
      <forms loginUrl="~/Login.aspx" timeout="2880" />
    </authentication>
    

    change to ~/Default.aspx

    0 讨论(0)
  • 2020-12-04 09:35

    Drezus - you solved it for me. Thanks so much.

    In your AccountController, login should look like this:

        [AllowAnonymous]
        public ActionResult Login(string returnUrl)
        {
            ViewBag.ReturnUrl = returnUrl;
            return View();
        }
    
    0 讨论(0)
提交回复
热议问题