Re: ASP.NET and background threads

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Paul Hatcher (phatcher_at_spamless.cix.co.uk)
Date: 01/26/05


Date: Wed, 26 Jan 2005 14:35:25 -0000

You're right - that would probably solve one of my major problems at the
moment, the ASP.NET process being recycled and therefore terminating the
background process.

Ok, time to read-up on invoking MSMQ from .NET :-)

Thanks

Paul

"Ollie Riches" <ollie_riches@hotmail.com> wrote in message
news:#BMsh76AFHA.3588@TK2MSFTNGP11.phx.gbl...
> Ideally you don't want to do a long running task inside the asp.net
process
> using a background thread, why? because it will compete with the both iis
&
> asp.net for system resources and therefore give you a less scalable and
less
> responsive system. Rather you should thinking about moving the long
running
> task out-of-process from the asp.net process so that it is executed
> asynchronously, message queues (MQ) are very suitable for this solution.
As
> for status information that will depend on how you implement the solution
> but you will probably end up writing status information to a data
repository
> (database) so that it can be queried by any interested party.
>
> HTH
>
> Ollie Riches
>
> "Paul Hatcher" <phatcher@spamless.cix.co.uk> wrote in message
> news:#8tVHZ6AFHA.2788@TK2MSFTNGP15.phx.gbl...
> > I have an ASP.NET application that uses a background threads to perform
a
> > long-running process. What I'm not sure is how to track and communicate
> with
> > the thread.
> >
> > The site is divided up into sections, each of which could have it's own
> > background process. Given that any user should be able to inquire
against
> > the current status of a process thread, I don't know how to keep a
> reference
> > to it unless I just put it into Global.asax, which seems a bit tacky.
> >
> > On a similar problem, I can't see how to retreive status information
from
> > the background process; I can give it an interface etc, but given that
the
> > page that needs the info is nothing to do with the page that initiated
the
> > action I can't see where to put the hooks.
> >
> > Regards
> >
> > Paul
> >
> >
>
>