Increasing page timeout

T

TC

I have a web page which contains a Girdview which is populated by a stored procedure. The stored procedure accesses a table on a linked server using openquery. Because this table is very large the page frequently times out (if it takes longer than 30 sec). Is there a way I can increase the timeout on either the web page itself, the gridview command or the connection string

From http://www.developmentnow.com/g/36_0_0_0_0_0/dotnet-languages-csharp.ht

Posted via DevelopmentNow.com Group
http://www.developmentnow.com
 
G

Guest

TC,
This is an ASP.NET group question, not a C# Language question. Please make
an effort to post to the correct newsgroup.
You can set the page timeout like this in web.config:

<location path="yourpage.aspx">
<system.web>
<httpRuntime executionTimeout="180"/>
</system.web>
</location>

You can set the Timeout on your SqlConnection in the connection string, and
you can set the CommandTimeout on the SqlCommand object. You may need all
three.

Of course, you should also try to optimize your SQL.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top