Timeout expired. The timeout period elapsed prior to completion of the operation or the server is n
广告:
Server Error in '/dzb' Application.
--------------------------------------------------------------------------------
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
语句已终止。
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
语句已终止。
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
语句已终止。]
FeiShareLibrary.DB.ExecuteNonQuery(String cmdtext, SqlParameter[] pas) +271
Mvcb2b.admin.Update_Content.Update(String content, Int32 id) in E:\aspnet2.0\hao_elec_all_jia\mvc_elec_jia\Mvcb2b\admin\Update_Content.aspx.cs:66
Mvcb2b.admin.Update_Content.Page_Load(Object sender, EventArgs e) in E:\aspnet2.0\hao_elec_all_jia\mvc_elec_jia\Mvcb2b\admin\Update_Content.aspx.cs:38
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3643; ASP.NET Version:2.0.50727.3634
1.
<add key="ConnectionString" value="Data Source=(local);Initial Catalog=Newspaper;User ID=sa;Password=123;Connect Timeout=20;max pool size=500" />
你把config 里面的
Connect Timeout=20 改成Connect Timeout=2000
2. SessionTimeout时间设置为99999
3.
连接字符串中设置了 Connect Timeout只对SqlConnection起作用。
SqlCommand.CommandTimeout
获取或设置在终止执行命令的尝试并生成错误之前的等待时间。
等待命令执行的时间(以秒为单位)。默认为 30 秒。
广告: