Posts
33
Comments
147
Trackbacks
0
App_Offline.htm, taking site down for maintenance

There is much simpler and graceful way to shut down a site while doing upgrade to avoid the problem of people accessing site in the middle of a content update.

 

Basically, if you place file with name 'app_offline.htm' with below contents in the root of a web application directory, ASP.NET will shut-down the application,  and stop processing any new incoming requests for that application. 

ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file (for example: you might want to have a “site under construction” or “down for maintenance” message).

 

Then after upgrade, just rename/delete app_offline.htm file…and the site would be back to normal.

Just remember that the size of the file should be greater than 512 bytes, doesn't matter even if you add some comments to it to push the byte size as long as it's of the size greater than 512 - it'll work fine.

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Maintenance Mode - Outage Message</title>
</head>
<body>
    <h1>Maintenance Mode</h1>

    <p>We're currently undergoing scheduled maintenance. We will come back very shortly.</p>
 
    <p>Sorry for the inconvenience!</p>

   
<!--       
    Adding additional hidden content so that IE Friendly Errors don't prevent
    this message from displaying (note: it will show a "friendly" 404
    error if the content isn't of a certain size).
   
    <h2>Site under maintenance...</h2> 
    <h2>Site under maintenance...</h2> 
    <h2>Site under maintenance...</h2> 
    <h2>Site under maintenance...</h2> 
    <h2>Site under maintenance...</h2> 
    <h2>Site under maintenance...</h2> 
    <h2>Site under maintenance...</h2> 
    <h2>Site under maintenance...</h2> 
      
-->
</body>
</html>

 

 

 

posted on Wednesday, March 28, 2012 4:25 PM Print
Comments
Gravatar
# re: App_Offline.htm, taking site down for maintenance
taylormccuteon
5/29/2013 11:25 AM
.I have explain so many article of this site in which some of them were very intresting and inspiring.This article has good title with good description. manualarticlesubmission.biz/
Gravatar
# re: App_Offline.htm, taking site down for maintenance
Bob Harford
6/6/2014 7:03 PM
First thanks for the post. It would be handy though if somebody gave an actual example of "root of a web application directory"
Gravatar
# re: App_Offline.htm, taking site down for maintenance
Chris
12/17/2014 11:55 PM
In your wwwroot directory or public_html directory are the two most commonly named.
Gravatar
# Html tricks
Marry Lisa
4/28/2017 7:05 AM
Geeks with blogs showing Law Assignment Writing Service AUSTRALIA vipin agarwal tips and tricks of code.
Gravatar
# re: App_Offline.htm, taking site down for maintenance
Pokemon
5/14/2017 10:02 PM
2 days ago found same issue for my website pokemon natures DURING maintenance now its done website is working fine now,
Gravatar
# re: App_Offline.htm, taking site down for maintenance
Albert
5/15/2017 9:09 PM
After website maintenance you need to go for a Guest Postings and Blogging four your more secure business which is coming from online resources.
Gravatar
# re: App_Offline.htm, taking site down for maintenance
Lisa Austin
6/23/2017 6:55 AM
Developer knows well about geeks with blogs because the student of I.T doing practice with Dissertation help online writing service UK for there development subject and want to know how resolve problems while making App offline.html, and most of the students only work on html java script but the professional students doing work on all kind of language like .Net, SQL, Java Script, Html and they know how resolve the under maintenance site there work is totally on coding like <h2>Site under maintenance...</h2> or </body> </html> this language can only understand by developers which are the professional in this field.
Gravatar
# Assignment Hepl
Michael Doherty
8/25/2017 5:04 AM
Many thanks for sharing this very diverse opinion post where each expert has no doubt shared his best knowledge on the topic. Have more success in your journey.
Finance Assignment Help Online from Expert Writers

Post Comment

Title *
Name *
Email
Comment *  
Verification