Web Service as a background service



I'm trying to create a Web Service that acts like a Windows Service. It
contains Start, Stop, and GetStatus methods. Invoking the Start method of
the web service should kick off a timer and the Stop method stops the timer.
I've been able to accomplish all by placing the timer in the Application
object (to persist its state). However, the timer doesn't fire since the web
method has finished executing (and the asmx file is unloaded?).

I've tried creating a seperate thread in hopes that the worker thread would
function after the web method finishes execution, but apparently that didn't
work. I suspect I would need to create a seperate process that runs in the
background, but I hope there's another way.

Could someone give some direction on a quick and easy approach, if one exists?
.



Relevant Pages

  • Re: streamwriter file lock (re-post)
    ... How do you know the other app will never try to run at the exact same moment as your timer? ... I'm surprised you use .NET and VB for this type of thing - I'd suggest using PERL for Web Service interaction. ... Private Sub myTimer_Elapsed ... Dim drCebos As DataRow ...
    (microsoft.public.vsnet.general)
  • Web Service (or Timer) Randomly Ending
    ... service's timer to run, the timer would log entries indefinitely until ... IIS service. ... I've now deployed the web service to a shared hosting environment (IIS ... is there an event or something I can trap to write ...
    (microsoft.public.dotnet.framework.webservices)
  • Web Service (or Timer) Randomly Ending
    ... I've built a .NET 2.0 web service and tied it into an ASP.NET 2.0 web ... service's timer to run, the timer would log entries indefinitely ... IIS service. ... is there an event or something I can trap to ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Timeout on web service call
    ... Dim callback As System.AsyncCallback ... The web service is set to sleep for 20 seconds, but I still don't get a ... I thought a timer created a thread, ... long time for whatever reason. ...
    (microsoft.public.pocketpc.developer)
  • Implementing scheduler in web service
    ... windowsservice AND webservice solution? ... I would like to use web service interface to ... >timer. ... >the timer in a Windows Service and use the web service to ...
    (microsoft.public.dotnet.framework.webservices)