Re: Safe multithreading in ASP.Net

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

From: Chris R. Timmons (crtimmons_at_X_NOSPAM_Xcrtimmonsinc.com)
Date: 08/06/04


Date: Fri, 06 Aug 2004 04:02:46 -0700


"who be dat?" <whatever@dot.com> wrote in
news:10h5vp3hujp9452@corp.supernews.com:

> Consider the following code which enables multithreading in an
> ASP.Net application I'm writing:
>
> Code in global.asx Application_start subroutine, Threadnotify is
> declared Globally as a new thread where it uses the address of
> EmailNotify below:
<SNIP/>

Chris,

Do you really want to start a new thread for each application
instance? Or do you just want a maximum of one thread running as
long as there is at least one application instance running?

Maybe you could also tell us more about the functional requirements
of your app. Do users log into/out of your app? If so, when do you
want the thread(s) to run - when the app starts or when the first
user logs in? If users are required to log in, then maybe you could
shut down the thread(s) when the user logs out, instead of when the
app ends.

-- 
Hope this helps.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/


Relevant Pages

  • Re: Saving Form Data Across a Session Timeout
    ... somehow the app checks to see if there is an active ... When the user logs in successfully, it then submits the form and then closes ... > session has timed out. ... > submitting) somehow and to let the user re-log in and have the first page ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: running app as a service - logoff user shuts down application
    ... Yes my app does interact with the desktop, and the appropriate check box is ... checked in the service properties window. ... >> however when a user logs off the application ends ...
    (microsoft.public.dotnet.framework)
  • Re: Windows Service
    ... account that is configured for the service. ... You can't guarantee ... this be an application that starts up when the user logs in. ... along with the identity of the person running the app. ...
    (microsoft.public.dotnet.languages.csharp)
  • Users logging into Term server with RDP
    ... I am running service pack 3 ... When a user logs into the app server they ...
    (microsoft.public.win2000.termserv.apps)
  • Users logging into Term server with RDP
    ... When a user logs into the app server they ... >come up and they get a desktop with access to the server. ... >able to access data they should not be able to. ...
    (microsoft.public.win2000.termserv.apps)