Link to home
Start Free TrialLog in
Avatar of Carla Romere
Carla RomereFlag for United States of America

asked on

Query Times out on aspx page

We have an aspx page that requests a date range and then runs a query that's specified in the select statement within the aspx page. When I run the query directly from sql server, the results are instantaneous. However, when I run the same date range from the aspx page, we get this error:

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

We've tried modifying the timeout settings in the machine.config file as well as in the web.config file, but it still times out after 25-30 seconds - even though the timeout was at one time set to 180 seconds.

What else can I check to get this query to run from the web page? It seems to do okay with a date range for less than one week, but much more than that is when it times out. We need to be able to run this query for a month and possibly even a year at a time.
<httpRuntime enable="true" executionTimeout = "360" />

Open in new window

Avatar of CB_Thirumalai
CB_Thirumalai
Flag of India image

Write a SP to run the query and call the SP from the front-end.  Just give it a try.
ASKER CERTIFIED SOLUTION
Avatar of Carla Romere
Carla Romere
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial