如何配置Web.config允许任何长度的要求

djvsome_bloody_fool提出了一个问题:How to configure the web.config to allow requests of any length,或许与您遇到的问题类似。

回答者Matt Varblow给出了该问题的处理方式:

Add the following to your web.config:

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxQueryString="32768"/>
    </requestFiltering>
  </security>
</system.webServer>

See:

http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits

Updated to reflect comments.

requestLimits Element for requestFiltering [IIS Settings Schema]

You may have to add the following in your web.config as well

<httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>

See: httpRuntime Element (ASP.NET Settings Schema)

Of course the numbers (32768 and 65536) in the config settings above are just examples. You don't have to use those exact values.

希望本文对你有帮助,欢迎支持JavaScript中文网

原文链接:stackoverflow.com

上一篇:jQuery vs jQuery?
下一篇:是会等于发生在XMLHttpRequest = 4?

相关推荐

官方社区

扫码加入 JavaScript 社区