【问题标题】:Redirection loop in identity authentication身份认证中的重定向循环
【发布时间】:2015-07-23 22:54:44
【问题描述】:

我正在使用身份验证用户,但在进入主页时我不断收到重定向循环(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>

怎么了?

【问题讨论】:

    标签: c# asp.net asp.net-identity


    【解决方案1】:

    尝试增加应用程序和 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

    【讨论】:

    • 现在我有一个重定向循环。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-07
    • 1970-01-01
    • 2014-05-28
    • 2014-04-18
    相关资源
    最近更新 更多