Quantcast
Channel: How to set timeout property to Connection String in web.Config?
Viewing all articles
Browse latest Browse all 9

How to set timeout property to Connection String in web.Config?

$
0
0

Hi,I m using ASP.NET C# application for .Net 2008

My question is that in my web.Config page,I want to set timeout propety for ConnectionString.

I m using connection string like that

<connectionStrings>

<

removename="LocalSqlServer"/><addname="ConnectionString"connectionString="Data Source=;Initial Catalog=;Persist Security Info=True;User ID=sa;Password=sa@123;Connect Timeout=200"providerName="System.Data.SqlClient"/>

</

connectionStrings>

Still connection time out is not set properly,Actually If I set the timeout from code as cmd.TimeOut=200 then it works fine,

but my problem is that there are many page where I have to do like that,So Can I do all this in web.Config file,So that we don't need

to write in all aspx page.

 I hope I'll get solution soon.

 

Thanks


Viewing all articles
Browse latest Browse all 9

Trending Articles