Results 1 to 2 of 2

Thread: Windows Service Status: Always 'Starting'

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    66

    Windows Service Status: Always 'Starting'

    I have a service that queries a sql database and emails a list of usres in active directory. The service installs and starts and runs without errors.

    However, the service is in a perpetual state of Starting, not Started, Stopped, or Paused. The biggest problem this causes, is the service cannot be stopped, paused, or restared while it's Starting. It also does not allow me to completely uninstall the service. To do that I must restart the computer and uninstall it a second time to make sure it is off the computer.

    before restarting the computer it sets the startup type to Disabled.

    The OnStart command has 2 statements:
    timer.enabled = True
    Call Function (variables)

    The function writes a log entry and emails me that it started.
    the bulk of the code is in the timer command.

    thanks for your help
    Jason Meckley
    Database Analyst
    WITF

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    66
    I got it working. I'm not sure why it's working now, and not before. Below is a list of the changes I made in case anyone else runs into this situation.[list=1][*]I added all the service pproperties to the app.config file.[*]I enabled the OnShutdown event[*]I gave the service a name in the ServiceName properity. I named the service in the service installer, but not th service itself.[/list=1]Now I can Start, Stop, and Restart the service and successfully uninstall it without too much hassle.
    Jason Meckley
    Database Analyst
    WITF

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width