You can place an MDriven Turnkey web application in a temporary maintenance state during deployment so users see an offline message instead of the application.
Put a Turnkey application offline
When you update a server, use an offline page to tell users that the application is temporarily unavailable. On IIS, a file named app_offline.htm in the application directory is served instead of normal application processing.
MDriven Turnkey includes a prepared offline-page file in the root directory of the Turnkey application:
app_offline - NotInEffect.htm
Maintenance procedure
- Open the root directory of the deployed Turnkey application.
- Rename
app_offline - NotInEffect.htmtoapp_offline.htm. - Edit
app_offline.htmif you want to give users a maintenance message that is appropriate for your organisation. For example:
<h1>Maintenance in progress</h1>
<p>This application is temporarily unavailable while we install an update. Please try again shortly.</p>
- Make the offline file take effect:
- On IIS, recycle the application pool.
- For a web app hosted in Azure, restart the web app.
- Deploy the new Turnkey version.
- Rename
app_offline.htmback toapp_offline - NotInEffect.htm, or rename it to any name other thanapp_offline.htm. - Recycle the IIS application pool or restart the Azure web app again if needed to ensure the application resumes normal processing.
Important filename requirement
The offline behavior is controlled by the exact filename app_offline.htm. While a file with that name remains in the application directory, IIS shows that file instead of processing requests for the application.
Do not leave the file named app_offline.htm after the deployment is complete. Rename or remove it to bring the application back online.
Example maintenance message
Use clear, short text that tells users what is happening and what to do next. For example:
<!doctype html>
<html>
<head>
<title>Application maintenance</title>
</head>
<body>
<h1>Application maintenance</h1>
<p>We are installing an update.</p>
<p>Please return in a few minutes.</p>
</body>
</html>
