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 秒。
廣告: