How can I check if my IIS is alive using C#?
-
How can I check if my IIS is alive using C#? If the server is down - how to do iisreset ?
there are quite a few free server monitors floating around the internets. I've been using PA Server monitor for some lightweight stuff. we had an old server with an iffy nic so we used a device called an iBoot that pinged the server and after x missed pings it killed power to the server and brought it back on after 30 seconds. If you want the app to run on the server i'm sure theres a way to check the app pools, or you could look at the asp_net or w3svc processes to see if they're still running. iisreset should be able to be run from a Process.Start() in c# once you determine its stopped.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.