We ALWAYS automate our deployments. We always deploy often.

This has many, many benefits. The most important of which is early feedback.

An essential tool when managing deployment of many sites to different environments is a smoke-test page that validates the configuration of the website in that particular environment.

SSW.HealthCheck makes it easy to check your site status.

 

clip_image016[4]

Figure: SSW.HealthCheck let’s us see at a Glance that on this site: the database connection is valid, but Debug mode has not been turned off and SMTP is not configured. We can also easily extend SSW.HealthCheck to perform other tasks like ensuring your database is up to date. I’ll address this in a future article.

 

Create a new web project

Lets start with a new web project, then we’ll add SSW.HealthCheck.

clip_image002[5]

Figure: Create a new web project called Northwind.MusicStore.WebUI

 

clip_image004[5]

Figure: Select the MVC template and click OK.
Optionally: add the ‘Web.API’ and ‘Add unit tests’ options.

Add SSW.HealthCheck.MVC5 to WebUI

clip_image006[4]

Figure: Select Tools | Library Package Manager | Package Manager Console. Enter Install-Package SSW.HealthCheck.MVC5 and press Enter.

Note: Alternatively you can use Tools | Library Package Manager | Manage NuGet Packages for the Solution, and then search for SSW.HealthCheck.MVC5 and click Install.

clip_image008[4]
Figure: Ensure SignalR is configured: Open Startup.cs from the root of your application. Ensure app.MapSignalR() is being called in the Configuration method.

clip_image010[4]

Figure: Run the application and navigate to /HealthCheck

Configure HealthCheck to Test Your Connection Strings

clip_image012

clip_image014
Figure: Because we are using Entity Framework Code First, and it does not actually create the database until the first time it is accessed: Click the Log In link from the toolbar, enter any username and password and click Log In. Because we are trying to access the database to verify credentials this will cause the database to be created.

clip_image016[4]

Figure: The HealthCheck status of your DefaultConnection should now be Passed !

Also, check out the SSW.HealthCheck user guide here http://sswhealthcheck.com/user-guide/