Help on creating windows services with VB.NET

  • Thread starter Thread starter SvdSinner
  • Start date Start date
S

SvdSinner

Guest
I'm working to create my first windows service w/ VB.NET (or any language for that matter).

First, I have the app working as a foreground app, and I need to convert it to a service. (It monitors and logs network connections, and I need it to monitor what happens during login.)

Here are my (current questions): (Might be more later)
1) How do I get VS.NET to create and installer to install this service? I found the MDSN instructions, but have never been able to get them to work. (The installer only installs the .exe file, but doesn't install it as a service) I can install it manually but haven't figured out how to get the installer to do it automatically.

2) When I install my app as a service manually, and try to start it, it just says that it is infinitely starting, and never says "started". How do I let the OS know that my service has started? (I'm guessing it is a property I need to set, or some service app equivilent of the doevents() command, but I don't know.)

3) Once I get it running, if it doesn't work as expected, what debugging options do I have?
 
Windows Services

Are you doing a lot of processing in the service start method.
If so it will timeout.
Use a timer.
Set the start service method to enable the timer after a short period.
It will then say started.
Then in the timer method disable the timer and call your long process.
Worth a try anyway.
 
Back
Top