在ASP.Net应用程序超时错误 [英] timeout error in ASP.Net application
问题描述
我已经设置超时时间如下场所240分钟再予。
I have set time out as 240 minuts in below places.
- 空闲超时选项的应用程序池
- 在Web.config中会话超时
- 通过在应用程序的全局配置变化sesstion时间。
不过面对某个应用程序超时的问题,这不来了定期。
是否有任何seession超时设置我离开?
Pleasde建议如果我能以更好的方式处理应用程序会话超时。
Still sometime facing issue of application timeout, this is not coming on regular basis. Is there any seession timeout setting i left? Pleasde suggest if i can handle the application session time out in a better way.
推荐答案
当我们处理大量的数据,一般可能会出现超时的问题...
在这些情况下照顾的三件事(的问题将得到解决的差不多)
When we deal with huge amount of data, generally it may occur TIMEOUT problem... in those situations Take care of 3 things ( problem will be almost solved )
-
把连接超时属性连接字符串
字符串CONNSTRING =数据源=本地主机;用户ID = SA; PWD =秘密;初始目录= nothwind;连接超时= 900;
put the connection timeout property in Connection string string connstring=" Data Source=localhost;User ID=sa; pwd=secret; Initial catalog=nothwind;connect timeout=900;";
设置命令超时SqlCommand对象
com.CommandTimeout = 0; //这个意志使要执行的命令无限秒
set the command timeout for the SqlCommand Object com.CommandTimeout=0; // this will makes Command to execute unlimited seconds
现在....最后但并非最不重要......形式卸载功能
销毁连接对象
conn.Dispose();
Now .... last but not the least... in the form unload function destroy the connection object conn.Dispose();
这篇关于在ASP.Net应用程序超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!