Friday 15 January 2010

.net - C# Windows Service runs but quits after the process has completed -


I have created a C # Windows service and need to do this. After this completion the service stops.

What do I need to do to stop the service with such a way when another feed of data is available then the service will be run through the source code and what it needs to do.

Any suggestions please thank you in advance.

- Jeff

The main function in the Windows service should be inside a loop , So that it continues to run until you receive a stop order. It does not matter as a loop, but the service will have to work continuously to keep going. In addition, the loop can not be run in the onstart method. You create a thread to run the loop, and start the thread with the onstart method.

No comments:

Post a Comment