I see that you fixed the problem; but in fact you, as a rule, should not start the service from the bin folder of the project - the files should be placed somewhere regardless of the project and profile (for example, in program files). For debugging purposes (when it will be located in the bin folder), you can determine if this is a service in Main() , and if it runs interactively, just run the service code directly, rather than the usual service launch setup.
You can detect either by adding a command line argument, or you can try checking Environment.UserInteractive .
Marc Gravell Feb 22 '09 at 9:23 2009-02-22 09:23
source share