How to put an asp.net website in maintenance mode

If you need to take your website offline, for any reason (eg. database maintenance, site move etc), you can do so very easily by just creating one .htm file and dropping in the root folder of your website.  Here’s what you need to do:

How to create a asp.net maintenance notice

  1. Create a blank HTML file called ‘app_offline.htm’, without the quotes.
  2. Open the file in your chosen editor (eg. Visual Studio, Notepad++, Dreamweaver etc).
  3. The ‘app_offline.htm’ file must be structured as a valid HTML format, like the below example.
    <html>
    <head>
    <title>Website name</title>
    </head>
    <body>
    <div style="text-align:center;">
    This website is currently offline for maintenance. Please try again later.
    </div>
    </body>
    </html>
  4. Make sure you change the contents of the title tag as well as changing the message.

How to activate the asp.net maintenance notice

To activate the asp.net maintenance notice that you created using the above steps, simply upload it to the root folder of your website.

If the maintenance message does not show, you may need to restart your sites application pool.

How to deactivate the asp.net maintenance notice

To de-activate the asp.net maintenance notice, simply deleted the ‘app_offline.htm’ file from the root folder of your website.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.