I need to implement a background process that runs on a remote windows server 24/7. My development environment is C#/ASP.NET 3.5. The purpose of the process is to:
If the process fails (which it probably will, especially when updates are added), I need for it to be restarted immediately (or within just a few minutes) as I would have very serious problems if this process failed to send a notification, log a GPS coordinate, or any of the other tasks its meant to perform.
Implement your process as a Windows service. For a straightforward example of how to code a Windows service this in .Net see http://www.developer.com/net/csharp/article.php/2173801 .
To control what happens should the service fail configure this through the "Recovery" tab on your service in services.msc. (see image below)
For higly critical operation you might look into setting up a server cluster for mitigating single server failure (see http://msdn.microsoft.com/en-us/library/ms952401.aspx ).
(source: microsoft.com)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With