c#做的webservice经常忘记扩大超时限制:
1、web.config:
<system.web></system.web>里面增加:<httpRuntime maxRequestLength="10240" appRequestQueueLimit="100" useFullyQualifiedRedirectUrl="true" executionTimeout="1200" />
2、扩大代理类的超时限制,默认是90秒
YourWebService yws = new YourWebService();
yws.Timeout = 1200000; //20分钟
3、IIS属性-网站 连接超时时间 1200秒
1、web.config:
<system.web></system.web>里面增加:<httpRuntime maxRequestLength="10240" appRequestQueueLimit="100" useFullyQualifiedRedirectUrl="true" executionTimeout="1200" />
2、扩大代理类的超时限制,默认是90秒
YourWebService yws = new YourWebService();
yws.Timeout = 1200000; //20分钟
3、IIS属性-网站 连接超时时间 1200秒
本文介绍如何在C#中通过修改web.config文件、代理类及IIS设置来调整WebService的请求超时时间。
5241

被折叠的 条评论
为什么被折叠?



