To do that, change the body of the Main method of the Windows service:
#if (!DEBUG)
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[] { new MyService() };
ServiceBase.Run(ServicesToRun);
#else
MyService service = new MyService();
service.MyOnStart();
#endif
You will get two error messages at the beginning but you can continue debugging.
Friday, September 01, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment