O
oscar.acostamontesde
Hello everybody. I'm currently developing a windows service. In OnStart
a launch two threads that carry on some work while the service is
running. My problem comes from the fact that once the service is
installed, it just time out at system startup and don't start. But i'm
able to start it manually once i'm logged in. I read in a page
something about signed assemblyes, saying that clr have to verify the
executable at startup, causing the delay. I just unsigned the assembly
and still face the same problem. I also notice that some compilation of
the solution start at system starup, and othes does not, with out
aparent reason, because there is no code change. Any sugestion? Here is
my code for OnStart method.
/// <summary>
/// Method launched on service start.
/// </summary>
/// <param name="args">none</param>
protected override void OnStart(string[] args) {
ThreadPool.QueueUserWorkItem(new WaitCallback(JobWs),
null);
ThreadPool.QueueUserWorkItem(new
WaitCallback(JobManteinance), null);
//// Write info to eventlog, so controler detects the
service start.
eventLog.WriteEntry("Service started",
EventLogEntryType.Information);
}
JobWs and JobManteinance are two functions that do all the work.
Thanks in advance.
a launch two threads that carry on some work while the service is
running. My problem comes from the fact that once the service is
installed, it just time out at system startup and don't start. But i'm
able to start it manually once i'm logged in. I read in a page
something about signed assemblyes, saying that clr have to verify the
executable at startup, causing the delay. I just unsigned the assembly
and still face the same problem. I also notice that some compilation of
the solution start at system starup, and othes does not, with out
aparent reason, because there is no code change. Any sugestion? Here is
my code for OnStart method.
/// <summary>
/// Method launched on service start.
/// </summary>
/// <param name="args">none</param>
protected override void OnStart(string[] args) {
ThreadPool.QueueUserWorkItem(new WaitCallback(JobWs),
null);
ThreadPool.QueueUserWorkItem(new
WaitCallback(JobManteinance), null);
//// Write info to eventlog, so controler detects the
service start.
eventLog.WriteEntry("Service started",
EventLogEntryType.Information);
}
JobWs and JobManteinance are two functions that do all the work.
Thanks in advance.