NetTalk Central

Author Topic: check if webserver stops working  (Read 2957 times)

olu

  • Sr. Member
  • ****
  • Posts: 352
    • View Profile
    • Email
check if webserver stops working
« on: April 15, 2011, 01:01:09 AM »
Is there a way to check if the webserver has stopped working and if so close down the whole application?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: check if webserver stops working
« Reply #1 on: April 15, 2011, 04:58:08 AM »
I seem to remember SelfService had an example that did this sort of thing.

Basically it is just an exe, with a window with a NetWebClient that fetches a page from the server every so often. If it fails it kills the server task and restarts it. There are plenty of "off the shelf" exe's that do this sort of thing as well.

OddJob is useful for the external stopping of the task, or use some windows API calls.

I also put GPF Reporter in my web server apps - then if they GPF they automatically restart.

cheers
Bruce