如何配置的web.config允许任何长度的要求 [英] How to configure the web.config to allow requests of any length
问题描述
我建立的,我想从一个textarea元素的值创建一个文件客户端的站点。
I am building a site in which i would like to create a file client side from the value of a textarea element.
我在的地方要做到这一点的code,但我得到这个错误
I have the code in place to do this, but i am getting this error
HTTP错误404.15 - 未找到请求筛选模块
配置为拒绝请求在查询字符串太长。
HTTP Error 404.15 - Not Found The request filtering module is configured to deny a request where the query string is too long.
有没有办法来覆盖这使我能够处理任何规模的要求呢?
Is there a way to override this so that I am able to process requests of any size?
如果没有,有没有一种方法来生成文件,客户端不使用文件系统/ Active X的对象?
If not, is there a way to generate files client side without using the filesystem/active x object?
感谢
推荐答案
以下内容添加到你的web.config:
Add the following to your web.config:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="32768"/>
</requestFiltering>
</security>
</system.webServer>
请参阅:
<一个href=\"http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits\">http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits
更新,以反映意见。
requestLimits元素的requestFiltering [IIS设置架构]
您可能需要添加如下在你的web.config以及
You may have to add the following in your web.config as well
<httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>
请参阅:的httpRuntime元素(ASP.NET设置架构)一>
当然在上面的配置设置的数量(32768和65536)只是例子。您不必使用这些精确值。
Of course the numbers (32768 and 65536) in the config settings above are just examples. You don't have to use those exact values.
这篇关于如何配置的web.config允许任何长度的要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!