asp .net 2.0 上的最大查询字符串长度
我正在研究 ASP .NET 版本 2.0 和 IIS 6。我通过调用其 URL 并向其传递查询字符串来从主页调用弹出的 aspx 页面。 对于特定情况,我的查询字符串的长度超过 2000 个字符。因此,弹出屏幕第一次打开时效果很好,但每当该弹出屏幕中有回发时,我都会收到互联网连接错误。 我确信发生这种情况是因为查询字符串的长度很大,因为当我减少查询字符串的长度时它工作正常。
有没有一种方法可以增加传递的查询字符串的最大允许长度。可以通过 web.config 或某些 IIS 设置进行配置吗?
I am working on ASP .NET version 2.0 and IIS 6. I am calling a pop up aspx page from the main page by calling its URL and passing querystring to it.
For a specific case the length of my querystring exceeds more than 2000 characters. So the pop up screen opens up fine for the first time but whenever there is a postback in that pop up screen, I get a internet connection error.
I am sure this is happening because of the large length of the querystring because it works fine when I reduce the length of querystring.
Is there a way we can increase the maximum allowed length of the querystring passed. Can it be configured through web.config or in some IIS settings.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
以下是我用于 ASP.Net MVC 4 参考
Following is the approach I use for ASP.Net MVC 4
REFERENCE
默认情况下为 2048。检查此帖子(MSDN)。在 web.config 的
httpRuntime
部分中设置maxQueryStringLength
。请在同一篇文章中查看对此的要求。
希望这对你有用。
By default it 2048. Check this post (MSDN). Set
maxQueryStringLength
inhttpRuntime
section of your web.config.Please check the requirements for this on the same post.
Hope this works for you.
httpRuntime
元素的属性maxQueryStringLength
仅受 4.0 及更高版本支持。您必须使用 IIS 设置来控制最大查询字符串限制。
http://www.iis.net/ConfigReference/system.webServer/security /requestFiltering/requestLimits
Attribute
maxQueryStringLength
ofhttpRuntime
element is supported only by 4.0 and above.You have to use IIS settings to control max query string limits.
http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits