C# 解决Get请求数据量过大时被拒绝访问

一: 在程序的web.config 中system.web 节点 里面插入
<httpRuntime maxRequestLength="999999999" maxQueryStringLength="2097151" />
二:在程序的web.config 中sconfiguration 节点 里面插入
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483647" maxQueryString="2147483647"/>
</requestFiltering>
</security>
</system.webServer>

这里主要是经过配置WebConfig,来提升程序的接受数据量大小。web

若是不严谨能够将Get请求转为POST请求也能够解决。spa

相关文章
相关标签/搜索