ASP.NET连接超时时间设置

来源:互联网 发布:阿里旺旺淘宝卖家版 编辑:程序博客网 时间:2024/05/21 06:26

1.IIS->[网站]->属性-》连接超时。默认为120秒

  2.WEB.CONFIG 手工添加httpRuntime,如

<system.web>
<httpRuntime maxRequestLength="1000000" executionTimeout="2000" />
</system.web>

  3.同步执行WEBSERVICE时,需要设置TIMEOUT属性,如

  CompilerSvr.MyFavoritesService compiler=new FDN.DMS.Controls.CompilerSvr.MyFavoritesService();

   compiler.Timeout =2000000; //毫秒

原创粉丝点击