Taking Down a Website for Maintenance - ASP.NET

Two things are required to take down an ASP.NET website for maintenance.



Whenever anyone tries to access any page on the site under the above conditions, they are presented with the contents of the app_offline.htm file and the HTTP status code 503 (Service Unavailable).

Sample APP_OFFLINE.HTM file
<html>
<head>
</head>
<body>
This website is temporarily offline for maintenance.  Check back soon.
<br/>
<br/>
<br/>
<span style='font-size:0.7em;color:blue'>The message appears because of the <kbd>app_offline.htm</kbd> file 
in the website's root folder. Remove or rename it when maintenance is completed.</span>
<!-–
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vitae velit ligula. Sed euismod nullam.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vitae velit ligula. Sed euismod nullam.
–->
</body>
</html>

A less verbose sample APP_OFFLINE.HTM file
<html>
<head>
</head>
<body>
This website is temporarily offline for maintenance.  Check back soon.
<!-–
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vitae velit ligula. Sed euismod nullam.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vitae velit ligula. Sed euismod nullam.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vitae velit ligula. Sed euismod nullam.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vitae velit ligula. Sed euismod nullam.
–->
</body>
</html>