今天同事在作经过接口访问数据时,因为提交的一个参数内容比较多,致使测试时报了如下错误。web
同时页面又给出了如下提示:测试
因此最终根据在网上找了相关资料总结出一下解决办法。spa
1. 在Web.config配置文件中节点<system.webServer>下作以下配置,若是没有如下节点,则自行新增;code
<security> <requestFiltering> <requestLimits maxAllowedContentLength="2147483648" maxQueryString="2147483648"/> </requestFiltering> </security>
2. 在配置节点<system.web>下作以下配置maxQueryStringLength="1024000",若是没有则自行添加blog
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="1024000" maxQueryStringLength="1024000" executionTimeout="900" />
这样两步操做,上面的问题完美结局。接口