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.

Advertisements