身份认证中的重定向循环
本文关键字:循环 重定向 身份认证 | 更新日期: 2023-09-27 18:04:16
我使用身份验证用户,但我一直得到重定向循环(url太长)时,进入主页
HTTP Error 404.15 - Not Found
The request filtering module is configured to deny a request where the query string is too long.
Detailed Error Information:
Module RequestFilteringModule
Notification BeginRequest
Handler ExtensionlessUrl-Integrated-4.0
Error Code 0x00000000
Physical Path c:'...'auth'login
Logon Method Not yet determined
Logon User Not yet determined
Request Tracing Directory C:'...'IISExpress'TraceLogFiles'BUDGETINGMANAGER
我使用visual studio 2013,并完成了这里的一切- http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-1
我找到了解决这个问题的方法,但都不奏效。我试过:
1)启用匿名认证
2)在config.web:
中禁用windows认证<windowsAuthentication enabled="false" />
<system.web>
<authorization>
<windowsAuthentication enabled="false" />
<anonymousAuthentication enabled="true" />
</authorization>
</system.web>
怎么了?
尝试增加应用程序和IIS中允许的查询字符串的最大长度:
应用程序:
<httpRuntime maxQueryStringLength="32768" />
IIS:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="32768"/>
</requestFiltering>
</security>
</system.webServer>
https://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxquerystringlength (v = vs.110) . aspx
https://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits