Sitecore Heartbeat Page & Web Forms for Marketers on Remote Servers

Configuration

When you are running Sitecore with multiple load balanced content delivery servers, typically you would use Sitecore's heartbeat page to monitor the health of each content delivery instance:

http://host/sitecore/service/heartbeat.aspx

This service does more than just return a http 200 status letting you know that the site is running, it also iterates over each connection string defined in ConnectionStrings.config and executes a simple SQL query against sys.tables to check for un-responsive databases.

This is all fine and dandy until you throw Web Forms for Marketers into the mix. On a remote installation of Web Forms for Marketers a connection string is added to ConnectionStrings.config that communicates with a content management instance and looks something like this:

Unfortunately the heart beat page will try to process this connection string but it doesn't know what to do with it so the page subsequently returns a 500 server error every time.

Fortunately Sitecore provides a way around this. If you look at the standard web.config you will not find a setting called:

Sitecore.Services.Heartbeat.ExcludeConnection

But, the heart beat page is coded to check for it (expecting a pipe separated list) and by default excludes the connection string called 'LocalSqlServer'.

As we know the best practice when adding custom settings to a Sitecore solution is to use include files. So, to fix this problem all we need to do is add (or update an existing) include file that contains the following:

And that's it! We have a working heart beat page on a content delivery instance that also has Web Forms for Marketers installed.