Query Times out on aspx page

Posted on 2009-02-17
Last Modified: 2012-05-06
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

Question by:Hers2keep
    LVL 12

    Expert Comment

    Write a SP to run the query and call the SP from the front-end.  Just give it a try.

    Accepted Solution

    Well, as it turns out, it all had to do with the date format as it was entered into the text box. Now I'm working on putting validation in place for that field and have started a new question for that.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
    User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now