Specify timeout in connection strings

Here is a quick way to specify the connection command timeout in the connection strings.

Use the property Connect Timeout  and specify a value to it. Here is an example of how this will look like in your application configs in asp.net

<add name=”MyConnString” connectionString=”Server=myserver; Database=mydb; User=sa; Password=mypass; Connect Timeout=20;” />

This is howevre only applicable to Sql Server connection strings.

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

%d bloggers like this: