Keep-Alive: When visiting a website, a slow loading time was observed. The loading time was attributed to worker processes timing out and shutting down due to inactivity. To keep worker processes active, a Keep-Alive has been compiled. One version of the keep-alive is an application while another is available as a web service.

Console application

The computer requires .NET 4.0 (minimum). Download and extract the FrankensteinAlive.zip. Open command-line and navigate to folder containing Frankenstein.

download

Frankenstein accepts three arguments.



1) Website URL (example: "http://www.oproot.com")

2) Text that exists on the website page being checked. (example: "Research")

3) Output folder where dead websites are logged (example: C:\test)

Example: Pass in website "http://www.oproot.com", text "Research", and path "C:\test". Website www.oproot.com is active and returns with text "Research", so nothing happens.



Unresponsive example: Website "http://www.oproot.com" is passed with text that does not exist ("doesnt exist XXXYYY"). The output path is set to "C:\test". Since the main page does not return with the specified text, a log file is written to the output path to provide notification of the unresponsive site.




The web service

Create a new project (new C# console application).

Right-click on the project.. Add.. Service reference..

service address

Click Go and set Namespace to 'Frankenstein'.



Within your project, call Frankenstein IsAlive method:
Frankenstein.FrankensteinClient 
  fc = new 
  Frankenstein.FrankensteinClient();
if (fc.IsAlive(
  "http://www.oproot.com", 
  "Research"))
{
  Console.WriteLine("alive");
}
else
{
  Console.WriteLine("dead");
}

The url "http://www.oproot.com" exists, is accessible and contains the text "Research" - the method returns true. If you pass in a URL that is not accessible or text that does not exist on a page, the method will return false. Your code can send notification (email, log) when a false is observed. In the application at the top, a text file is written out each time a false is returned.