[Mono-list] mono-service2 doesn't call OnStart

Adam Tauno Williams adam at morrison-ind.com
Sat Oct 25 12:35:14 EDT 2008

I've create a fairly simple System.ServiceProcess.ServiceBase on what I
think is the correct manner.   But when I try to run it with
mono-service2 it seems as though nothing at all happens, not even any
error messages.

$ mono-service2 --no-daemon Whitemice.ZideNET.exe
 - or -
$ mono-service2 Whitemice.ZideNET.exe

It does not even create the log file configured via log4net for the
Service object.  If I run it via straight mono -

$ mono Whitemice.ZideNET.exe
$ cat ZideNET.log 
DEBUG ZideNET.Service (null) - Main
DEBUG ZideNET.Service (null) - Service ctor
DEBUG ZideNET.Service (null) - Service ctor complete
DEBUG ZideNET.Service (null) - Starting 1 services....

- I get a log but, of course, the service doesn't actually start.

Is there a bug/issue or am I (very probably) missing something obvious?
I've never created a service before,  but from the docs it looked pretty

mono-core-2.0.1-18.1 / openSUSE 11
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Service.cs
Type: text/x-csharp
Size: 2908 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20081025/df031d35/attachment.bin 

More information about the Mono-list mailing list