MVC Forms LoginUrl is incorrect

前端 未结 8 893
旧时难觅i
旧时难觅i 2020-11-30 07:07

I have an ASP.NET MVC 3 application with forms authentication. For some reason that I cannot see, the login redirect url is /Account/Login?ReturnUrl=%2fSecure%2fAction

8条回答
  •  不知归路
    2020-11-30 07:56

    After Trying Many technique in .net MVC 5 in VS2015 I ended up here.

    Its was hard to understand but yet very Simple. Whatever we code within Form loginURL was later removed OR replaced by the web.config itself.And this line in the Web.Config does it.

     
    

    Comment the line out in web.config and then it won't go to "Account/Login" automatically. I tested in VS2015 and it works like a charm. :)

提交回复
热议问题