您的位置:首页 > 编程语言 > ASP

asp.net 网页超时设置

2012-11-20 23:01 357 查看

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

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

<system.web>

 <httpRuntime maxRequestLength="100000" executionTimeout="2000" />

</system.web>

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

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

   compiler.Timeout =2000000; //毫秒


<httpRuntime maxRequestLength="20480" executionTimeout="60"/>

maxRequestLength:单位是KB,上面一行的意思是表示最大上传文件的大小限制

executionTimeout="60" 设置的是超时时间。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: