|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Long Running ProcessAs 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 "n#" <nare***@gmail.com> wrote in news:1134749758.943081.97660 @o13g2000cwo.googlegroups.com:> To avoid the HTTP_TIMEOUT, I created a timer in the Async Handler, Nope... IIS has a timeout property - so even if you output data, if the > which would send some empty Reponse.Write to Client - (to avoid > timeout) > > Response.Write " " ?? 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. -- Stan Kee (spamhoneypot@rogers.com) 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. "n#" <nare***@gmail.com> wrote in news:1134749758.943081.97660 @o13g2000cwo.googlegroups.com:Show quote > 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 > > |
|||||||||||||||||||||||