Cannot Start my VB.Net Service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I am able to succesfully build and install my VB.Net Windows Service,
using the Command Line InstallUtil #EXE PATH#.

However, when I press start in MMC, to start the service, I get this error
message:

Could not start the #SERVICENAME# Service on Local Computer.
The service did not return an error. This could be an internal Windows error
or an internal service error. If the problem persists, contact your system
administrator.

There is nothing in the install log to suggest that the installation was not
succesful.

Can anyone suggest why this is hapenning?
 
does your service attempt to pop up a window? If so, it probably won't
start. Does it write to a file or contact a database (even to log errors)?
If so, it may need an identity, and it may be failing during the initial
constructors due to untrapped errors.

Just guesses,
--- Nick
 
Nick, in answer to your questions, No, it doesn't attempt to show a popup
window.

It attempts to write a line to the Event Log. It then passes the timer
control (byref) to a function I wrote, which, in turn, reads from a database,
and starts the timer.

That's a good point; Although my OnStart only has two lines, it didn't have
a try/catch. However, I've added these lines, rebuilt, reinstalled, and i'm
still faced with the same error.

It's also worth noting that i've managed to successfully install and start
this service on a different machine. However, I really need to install and
test this service on my own development PC, but it won't start.
 
I'm really not sure. What account are you using to start the service? If
you provide your admin account, does the service start?

Did you say "timer control"? You mean "timer object"... right? Controls
live on forms and forms are a real problem in a service.

--- Nick
 
Back
Top