Many IT departments have systems in place which monitor internal applications to detect outages.
This requires sending a web request to applications to test if a response is positive, a proof of life, or health check. This can happen thousands of times per day depending on user configuration.
To integrate such a check with MooD Active Publisher, please use the page HealthCheck.aspx instead of the root URL or Login.aspx or Controller.aspx.
Using our internal site below, you can see that it presents a very simple page if visited by a user; internally it does a lot more.
HealthCheck.aspx does not require authentication (more on this later), and it tests the following:
- Tests the basic connection from Active Publisher to the repository is alive.
- Tests that the connection between BIE and Active Publisher is alive.
- Tests the Model Publisher factory pool is alive.
- Tests a Model Publisher can be requested.
- Finally, tests that if a real user attempted to login, are there enough licences left
If any of these checks fail, then the request will return server error 500.
Setting up HealthCheck.aspx with Forms authentication
If you are using Forms authentication, you will already have Anonymous authentication enabled thus no more configuration is required. An automated process which targets HealthCheck.aspx will not require login credentials.
Setting up HeathCheck.aspx with Windows Authentication
If you have enabled Windows Authentication for your IIS site more configuration is required to allow an anonymous user access to the page, because the whole site is usually locked down to require authentication.
Typically, Active Enterprise using Windows Authentication has the following configuration:
Business Architect's Active Enterprise Settings, would show Integrated:
Internet Information Services would have all but Windows Authentication Enabled:
In order for HealthCheck.aspx to be available to anonymous requests, you need to do the following:
Step 1 - Configure IIS to allow sites to override per-page anonymous access
First, click the root node in the Connections pane.
Then double click the Feature Delegation icon.
When the list of options appears, locate Authentication - Anonymous and right click it
Alter the setting to Read/Write
Step 2- Configure HealthCheck.aspx to allow anonymous access
Back in the Connections pane, right mouse button your Active Enterprise site and Switch to Content View.
Right mouse button HealthCheck.aspx and select Switch to Features View.
Double click on the Authentication icon
Enable Anonymous Authentication, and disable Windows Authentication
Active Publisher will automatically detect this change and configuration should now be complete, allowing HealthCheck.aspx access via an anonymous request, whilst maintaining security of the rest of the site.
If you visit the HealthCheck.aspx page as a user, do not be concerned that there is a broken logo, nor that you may see multiple login boxes. This page is not designed to be visited by a user. These issues are fixable by adding more similar settings to dependencies, but not required.
Testing
You can simply test that your configuration is correct by using an InPrivate (Edge) or Incognito (Chrome) session, then type in the full URL for the HealthCheck.
Here you can see a further method of testing, where we use the JavaScript console in Edge to prove that status 200 can be returned via the fetch command:
When successful:
You may find using .then(console.log) useful so you do not have to expand the Promise.
Note: You should confirm that, from a new private browser session, you do get login prompts and 401 failures for the popular pages Login.aspx, Controller.aspx and Status.aspx using fetch.
Comments
0 comments
Please sign in to leave a comment.