A service runs in the background, without an associated user session. It can even start running when no user has logged on to the machine.
A server must be installed before it can be used. Add an installer to your project, and then run the application with the Install option. This need only be done once.
Because a service has no user interface, it must use non-interactive methods of communication such as sending email, writing to the event log, or writing to files on the hard drive when errors occur.
To send email, use Web::Mail::SmtpMail .
To write to the event log, use Diagnostics::EventLog . Set the log name and source before writing an entry.
To debug a service, insert a pause in the function called by OnStart() , start the service, and attach the debugger to the running process.