我的ASP.NET MVC应用程序中有一个简单的登录屏幕。我对它有一个奇怪的体验。浏览器上的返回URL重复,看起来像这个
"http://localhost:65023/Account/Login?ReturnUrl=%2FAccount%2FLogin%3FReturnUrl%3D%252FAccount%252FLogin%253FReturnUrl%253D%25252FAccount%25252FLogin%25253FReturnUrl%25253D%2525252FAccount%2525252FLogin%2525253FReturnUrl%2525253D%252525252FAccount%252525252FLogin%252525253FReturnUrl%252525253D%25252525252FAccount%25252525252FLogin%25252525253FReturnUrl%25252525253D%2525252525252FAccount%2525252525252FLogin%2525252525253FReturnUrl%2525252525252525252525252525253D%252525252525252525252525252525252FAccount%252525252525252525252525252525252FLogin%252525252525252525252525252525253FReturnUrl%252525252525252525252525252525253D%25252525252525252525252525252525252FAccount%25252525252525252525252525252525252FLogin%25252525252525252525252525252525253FReturnUrl%25252525252525252525252525252525253D%2525252525252525252525252525252525252FAccount%2525252525252525252525252525252525252FLogin%2525252525252525252525252525252525253FReturnUrl%2525252525252525252525252525252525253Dhome%2525252525252525252525252525252525252Findex"
任何想法都将不胜感激。
我已经尝试了以下内容,在我的web.config
文件中添加了以下配置。
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="32768"/>
</requestFiltering>
</security>
</system.webServer>
[浏览器错误]
[https://i.stack.imgur.com/tG3O6.png]
您的登录操作中似乎有Authorize属性。当您转到"帐户/登录"时,此操作将引导您再次转到"帐户"/"登录"。因此,您可以尝试将AllowAnonymous属性添加到登录操作中。