Long Running Process

N

n#

Environment ASP.NET 1.1 , Windows 2000 Advanced Server

As part of our project requirement we're calling a long running process
(Stored Proc - Database residing in a different machine).

We made this to be taken care by a Asynchronous Handler (*.ashx) and
called using the xmlhttp object.

In the above scenario we started getting HTTP_TIMEOUT error and xmlhttp
returns a status code of 12002.

To avoid the HTTP_TIMEOUT, I created a timer in the Async Handler,
which would send some empty Reponse.Write to Client - (to avoid
timeout)

Response.Write " " ??

Is this a correct solution?

Or my assumption of behavior of TCP (connection oriented) / HTTP
(Connection less) is wrong?

pls help
 
G

Guest

To avoid the HTTP_TIMEOUT, I created a timer in the Async Handler,
which would send some empty Reponse.Write to Client - (to avoid
timeout)

Response.Write " " ??

Nope... IIS has a timeout property - so even if you output data, if the
process runs longer than the timeout, the process will be terminated.

So, take a look at your IIS settings and set the timeout higher.

Is this a correct solution?

Overall this is the wrong solution - IIS is not designed for long running
processes.

If you need to execute long running processes, you should use a Windows
Service or perhaps some sort of message queue.
 
J

James Doughty

The easiset solution in my opnion is to create a thread ,spawn it and let
it execute the stored proc. After you spawn it have a timer do a callback
to the page and then see if the thread is done. I've had one perform for
over 2 hours.
 

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,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top