1、
一、web.config配置,<system.web></system.web>里面增 加:
<
httpRuntime
maxRequestLength
="10240"
appRequestQueueLimit
="100"
useFullyQualifiedRedirectUrl
="true"
executionTimeout
="1200"
/>
二、扩大代理类的超时限制,默认是90秒

YourWebService yws =
new YourWebService();

yws.Timeout = 1200000;
//20分钟
三、IIS属性-网站 链接超时时间 1200秒
2、
一、修改 app.config 文件,添加以下代码:
<
httpRuntime
executionTimeout
="600"
/>
请求执行超时时间为600秒(默认为110秒)
二、设置 Web services 的 Timeout 属性
对 XML Web services 的同步调用的超时(以毫秒为单位)。默认为 100000 毫秒。

lywSqCommon.sqsdData.GetData getData =
new lywSqCommon.sqsdData.GetData();
//GetData 为类名
getData.Timeout=700000;
//单位为毫秒
指示 XML Web services 客户端等待同步 XML Web services 请求完成的时间(以毫秒计)。
提示:若是将 Timeout 属性设置为 Timeout.Infinite,则指示该请求无超时。即便 XML Web services 客户端能够将 Timeout 属性设置为无超时,Web 服务器仍能够在服务器端使请求超时。
系统将以上面两项设置的最小者做为操做超时的时间长度。