Web service 超过了最大请求长度错误解决

Web service 超过了最大请求长度错误解决System.Web.Services.Protocols.SoapException: 运行配置文件中指定的扩展时出现异常。 ---> System.Web.HttpException: 超过了最大请求长度。
Web service 超过了最大请求长度错误解决   在 System.Web.HttpRequest.GetEntireRawContent()
Web service 超过了最大请求长度错误解决   在 System.Web.HttpRequest.get_InputStream()
Web service 超过了最大请求长度错误解决   在 System.Web.Services.Protocols.SoapServerProtocol.Initialize()
Web service 超过了最大请求长度错误解决   --- 内部异常堆栈跟踪的结尾 ---

解决方法
修改 web.config如下

Web service 超过了最大请求长度错误解决<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />

  asp.net默认最大上传文件大小为4096      
  修改web.config文件可以改变这个默认值      
  <configuration>      
        <system.web>      
                    <httpRuntime     maxRequestLength="10000"     ......>      
        </system.web>      
  <configuration>      
  ---------------------------------------------------------------      
  通常更常用的的方法是直接修改         c:\winnt\microsoft.net\dotnetframework\1.xxx.xx\config     目录下的     machine.config     文件,      
  查找     "<httpruntime"     在这一行将     maxRequestLength的值改为理想的值,比如想要8M,就输入8192.      
  这样,你的任何一个     web     工程都可以上传最大8M的文件。   

相关文章:

  • 2021-05-25
  • 2021-10-20
  • 2021-12-29
  • 2022-02-27
  • 2021-10-20
  • 2022-12-23
猜你喜欢
  • 2022-01-20
  • 2021-11-25
  • 2022-12-23
  • 2022-02-17
  • 2021-07-11
  • 2021-12-07
相关资源
相似解决方案