ASP.NET page doesn't timeout when hanging on database call

M

Marcin Belczewski

I have ASP.NET page that invokes a stored procedure in the database.
It takes about 60 seconds for the stored procedure to complete.

In web.config I have <httpRuntime executionTimeout="10"/> and
<compilation debug="false" /> so I expect that "timeout expired" whill
show up in the browser after 10 seconds.

Unfortunately ASP.NET page doesn't show the "timeout expired"
information in the browser after 10 seconds!
The information is shown once stored procedure is fininshed which is
about 60 seconds!!

Why ASP.NET doesn't show "timeout expired" after 10 seconds but waits
until database call is completed?

Is that because database drivers are unmanaged and ASP.NET cannot
interrupt such call?

Mabsky
 
G

Guest

You are on the right track. It is not only unmanaged, however, but the fact
you are dealing with synchronous calls. If you truly want to time out after
10 seconds and "disconnect" from the results of the sproc, spawn another
thread and allow your main thread to time out.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
M

Marcin Belczewski

Cowboy said:
You are on the right track. It is not only unmanaged, however, but the fact
you are dealing with synchronous calls. If you truly want to time out after
10 seconds and "disconnect" from the results of the sproc, spawn another
thread and allow your main thread to time out.
Thanks!
Where (on the net) I could read more about it??
I've been googling for some explanation for some time now and couldn't
really find anything

Regards
Mabsky
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top