I want a single thread of business process to run continuously in .net. For which can I am thinking of making a window service that will run continuously.
If this service fails i want web based control for administrator.
Problem 1: If this service fails how can I check this through web based application(I can check by SC command using command prompt but how to move this to web based environment).
Problem 2: I m thinking of making service run continuously by using while(true) loop. Is this is correct way to address this problem.
Problem 3: How can I make sure only one instance run at time?
Problem 1: see here
Problem 2: Not a great idea. What is the service doing? Usually it will fire on an event like a Filesystem Watcher, or sleep for a while and wake to perform necessary tasks.
Problem 3: A Windows service is not like other executables in that there will only be one copy of the service if you only install one. You start and stop it as required.