<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Tolga Koseoglu : Asp.net time-out</title><link>http://weblogs.asp.net/tolgakoseoglu/archive/tags/Asp.net+time-out/default.aspx</link><description>Tags: Asp.net time-out</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Asp.net web application times out on long running stored procedure</title><link>http://weblogs.asp.net/tolgakoseoglu/archive/2008/01/24/asp-net-web-application-times-out-on-long-running-stored-procedure.aspx</link><pubDate>Fri, 25 Jan 2008 02:32:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5647536</guid><dc:creator>kemaltolga</dc:creator><author>kemaltolga</author><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/tolgakoseoglu/rsscomments.aspx?PostID=5647536</wfw:commentRss><comments>http://weblogs.asp.net/tolgakoseoglu/archive/2008/01/24/asp-net-web-application-times-out-on-long-running-stored-procedure.aspx#comments</comments><description>&lt;P&gt;&lt;CONNECTIONSTRINGS&gt;&lt;ADD name="DatamartConnectionString" connectionstring="Data Source=irvpr3909cw9yb1;Initial Catalog=Datamart;User ID=fa;Password=fa; Connect Timeout=60;" providername="System.Data.SqlClient"&gt;&lt;/ADD&gt;&lt;/CONNECTIONSTRINGS&gt;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.&lt;/P&gt;
&lt;DIV class=Section1&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;connectionStrings&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;add&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red; FONT-FAMILY: 'Courier New'"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR: windowtext; FONT-FAMILY: 'Courier New'"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;DatamartConnectionString&lt;/SPAN&gt;&lt;SPAN style="COLOR: windowtext; FONT-FAMILY: 'Courier New'"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/SPAN&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: red; FONT-FAMILY: 'Courier New'"&gt;connectionString&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR: windowtext; FONT-FAMILY: 'Courier New'"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;Data Source=XXX;Initial Catalog=Datamart;User ID=XXX;Password=XXX; &lt;FONT size=4&gt;&lt;STRONG&gt;Connect Timeout=60&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: windowtext; FONT-FAMILY: 'Courier New'"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red; FONT-FAMILY: 'Courier New'"&gt;providerName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR: windowtext; FONT-FAMILY: 'Courier New'"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;System.Data.SqlClient&lt;/SPAN&gt;&lt;SPAN style="COLOR: windowtext; FONT-FAMILY: 'Courier New'"&gt;"&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; /&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;connectionStrings&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;
&lt;P&gt;Good luck&lt;/P&gt;
&lt;P&gt;--tolga--&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5647536" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/tolgakoseoglu/archive/tags/Long+running+asp.net+applications/default.aspx">Long running asp.net applications</category><category domain="http://weblogs.asp.net/tolgakoseoglu/archive/tags/Asp.net+time-out/default.aspx">Asp.net time-out</category></item></channel></rss>