今天做了个文件上传,可上传文件一大,就会出现请求已超时的错误,所以要修改WEB请求的时间。

在网上找了一下代码,代码如下:

修改Web.Config文件:  
  <?xml   version="1.0"   encoding="BIG5"?>  
  <configuration>  
      <system.web>  
      <httpRuntime   maxRequestLength="512000"   useFullyQualifiedRedirectUrl="true"   executionTimeout="300"/>    
      </system.web>  
  </configuration>  

我这里时间设置的是300,就是300秒。五分钟,这样就可以了,你也可以根据你的时间来设置
maxRequestLength这个是文件最大多少k ,也根据你的需要来设置。


 

相关文章:

  • 2021-12-11
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-26
  • 2021-10-20
  • 2021-06-12
  • 2022-12-23
  • 2021-10-07
  • 2021-09-07
相关资源
相似解决方案