Overview
There are times where you may need to take an ASP.NET application offline to perform maintenance.
In this post I’ll show you how to do exactly that using the out-of-the-box capabilities of IIS / ASP.NET.
How To:
Create a HTML file called “app_offline.htm” in the root directory of the web application. IIS will recognise this special file and immediately suspend all web requests for the site and instead display the contents of the app_offline.htm file to the client.
Create a HTML file called “app_offline.htm” in the root directory of the web application. IIS will recognise this special file and immediately suspend all web requests for the site and instead show the app_offline.htm file to the client.
To bring the application out of “maintenance mode” simply remove the file. Nice and easy 🙂
Final Thoughts
Hope this post helps.
More information can be found at the below link:
https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/advanced-enterprise-web-deployment/taking-web-applications-offline-with-web-deploy
- Solved: Cmder – ‘ls’ is not recognized as an internal or external command, operable program or batch file. - 16th April 2024
- Solved: ‘Unable to find package specflow.plus.license’ error - 14th February 2024
- How to: Use GitHub Actions with OIDC to Authenticate with Azure - 16th November 2023
Leave a Reply