Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Error: “Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.”

Keyword: timeout, expired, c#, asp.net, dbcommand, server, execute

Scenario: Error when executing your DbCommand more than 30 seconds.

Solution: Extend your CommandTimeout

DbCommand dbCommand = new DbCommand();
dbCommand.CommandTimeout = 120;

One thought on “Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s