locked
Window Service Issue RRS feed

  • Question

  • Hi ,

    I am developing a Window service and below is its Onstart method

     protected override void OnStart(string[] args)
      {
           
       Thread.Sleep(new TimeSpan(0, 10, 0));
       
       }

    but when i start the service it gives me following error\

    Window could not start the MaxTimeService on the local computer.
    
    Error 1053: The service did not respond to the start or control request in a timely fashion

    what could be the reason for this...

    Thanks in advance

    Tuesday, March 1, 2011 10:01 AM

All replies

  • Hi,

     

    onstart has to do only starting the work.

    it has to exit gracefully.

    other wise the service manager kills the service,  because it identifies that main thread is not free.

     

    WBR,

    prasadpnvrk


    regards, pnvrkprasad
    Sunday, March 27, 2011 9:19 AM