in

ASP.NET Weblogs

Tolga Koseoglu

Asp.net web application times out on long running stored procedure

If you are running a web application and you are processing a stored procedure that takes quite a while you might get a time out error. An easy way to fix this is to add "Connect Timeout=60" to your connection string in the web.config file. 60 is in seconds and just an example. Here is an example connection string.

<connectionStrings>

     <add name="DatamartConnectionString"

connectionString="Data Source=XXX;Initial Catalog=Datamart;User ID=XXX;Password=XXX; Connect Timeout=60;" providerName="System.Data.SqlClient" />

</connectionStrings>

Good luck

--tolga--

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add

About kemaltolga

Born in Ankara, Turkey. Raised in Germany. Recruited for the Track & Field Team at Texas A&M University in College Station, TX, in January 2000. NCAA champion in 2001 (Discus). Work for design firm in southern California. Married with two daughters.