How to solve Redirect Loop

后端 未结 4 2060
半阙折子戏
半阙折子戏 2021-01-13 08:25

I have a web application, and some users who use Chrome as their preferred browser of choice, get the following error when they have logged out of the application, and try t

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-13 08:48

    I also had a redirect loop which resulted in the error message The request filtering module is configured to deny a request where the query string is too long. for a Visual Studio 2013 Web Site where Authentication was set to Individual User Accounts.

    The requested URL was a long version of http://localhost:52266/Account/Login?ReturnUrl=%2FAccount%2FLogin%3FReturnUrl%3D%252FAccount%252FLogin%253FReturnUrl.... so it was obviously continually redirecting to the login page and appending the return URL each time.

    No amount of of breakpoints in an attempt to find the offending loop seemed to make a difference, as none were triggered.

    In the end I did the following:

    • Find the project properties. Do this by selecting the project (not solution) and see the Properties window (don't right-click then choose Properties, otherwise you won't find it).
    • Set Anonymous Authentication to Enabled.
    • Set Windows Authentication to Disabled.

    When starting the project the default page should now appear and breakpoints you have added should start working.

提交回复
热议问题