Hello,
I've spent some time setting things up that seem to work very nicely, but it was painful without being able to debug. Anyway, can anyone help with the following as after a few days playing this is my only outstanding issues:
1. I added command line support as follows:
HostFactory.Run(hostConfigurator =>
{
hostConfigurator.AddCommandLineDefinition("params", f => { startParams = f; });
hostConfigurator.ApplyCommandLine();
Which is fine from the commandline, but I wish to access something similar from the running service. I assumed the 'start parameters' option in the service dialog would equate to the same thing, but it's not. Can somebody tell me how to access 'start parameters' please?
2. I wish to programmatically stop the service, but I can't see how. Is there a way? I can throw and exception but that doesn't look nice and it's always 'error 5: access denied'?
3. How do I debug the program running as a service? my program initially crashed in startup or just after it started so attaching the debugger doesn't help, I want to be able to run the program from within Visual Studio as a service. Or if not, maybe just how to attach the debugger before it starts processing would help.
Thanks for your help.
Neil.