Re: C# service, performs lots of things on start, windows doesnt give it enough time!



On Mon, 27 Aug 2007 12:58:33 -0700, "test@xxxxxxxx"
<craig.whitcombe@xxxxxxxxx> wrote:

Hello all,

I am developing a windows service (c#, .net 2.0, windows 2003).

When the service starts it performs several functions that depend on
an internet connection, downloading rss feed etc.

The problem is, that if the connections is very slow, it takes a long
time for the status of the service to change from "starting" to
started, sometimes in fact, so long that windows gives up and says
that the service did not respond in a timely fashion.

If I wrap all my onstart functions into a timer.elapsed event instead,
the service status changes from starting to started instantly. I dont
like this though as it is not very eloquant. Is there a better way to
do this?

Many thanks,
Craig

What do you do if there is no Internet connection when your service
starts?

It makes sense to me to separate the starting of the service from the
processing that occurs when an Internet connection becomes available
(which might or might not be when the service starts).
.



Relevant Pages

  • Re: Weird happenings
    ... I dont have an internet connection so I dont see how it could be a virus. ... David ... >> to type or view documents the scroll bar goes mad and ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Problem with IE6
    ... I dont know if this ... > Could be a malware problem. ... > This Winsock repair tool may help, either before or after removing spyware ... >> only with internet connection. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: C# service, performs lots of things on start, windows doesnt give it enough time!
    ... an internet connection, downloading rss feed etc. ... If I wrap all my onstart functions into a timer.elapsed event instead, ... like this though as it is not very eloquant. ... doing as part of its main task and not as part of initialization. ...
    (microsoft.public.dotnet.framework)
  • Re: DSL Problem
    ... 'Forum Post schrieb am 06.01.2006 17:26: ... > Lets not forget that I dont have internet connection on my Kubuntu ...
    (Ubuntu)
  • DHCP Client problem
    ... I am having a problem with my internet connection on Suse Ent. ... detects my network card and configures it fine, but I dont know how to ... I dont know how to do it ...
    (alt.os.linux.suse)