System.Data.SqlClient.SqlException Timeout time has expired

Source: Internet
Author: User
Tags mscorlib

Error message:

For more information about invoking just-in-time (JIT) debugging instead of this dialog box, see the end of this message. Exception text **************system.servicemodel.faultexception ' 1[system.servicemodel.exceptiondetail]: Timeout time has arrived. The time-out elapses before the operation completes or the server is not responding. (the error details are equal to the exceptiondetail that are most likely created by Includeexceptiondetailinfaults=true, with the value: System.Data.SqlClient.SqlException: Timeout time has arrived. The time-out elapses before the operation completes or the server is not responding. In System.Data.SqlClient.SqlConnection.OnError (SqlException exception, Boolean breakconnection) in System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning () in System.Data.SqlClient.TdsParser.Run (Runbehavior Runbehavior, SqlCommand Cmdhandler, SqlDataReader dataStream, Bulkcopysimpleresultset Bulkcopyhandler, Tdsparserstateobject stateobj) in System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds (String methodName, Boolean Async) in System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery (dbasyncresult result, String methodName, Boolean Sendtopipe) in System.Data.SqlClient.SqlCommand.ExecuteNonQuery () in Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteNonQuery (dbcomMand command) at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery (DbCommand command) ************ * * Loaded assembly **************MSCORLIB assembly version: 4.0.0.0win32 version: 4.0.30319.18444 built BY:FX451RTMGDR codebase: file:///C:/Windows/ Microsoft.net/framework/v4.0.30319/mscorlib.dll----------------------------------------

Solution:

System.Data.Common.DbCommand Sqlstringcommand = This.db.GetSqlStringCommand (SQL); sqlstringcommand.commandtimeout = 1800000;this.db.executenonquery (Sqlstringcommand);

Modify the command's Timeout property at an inappropriate time.


System.Data.SqlClient.SqlException Timeout time has expired

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.