CODEDIGEST
Home » FAQs
Search
 

Technologies
 

How to make the ASP.Net Application Offline when we are Upgrading?
Submitted By Satheesh Babu B
On 12/30/2008 8:36:27 AM
Tags: Interview Questions,ASP.Net  

How to make the ASP.Net Application Offline when we are Upgrading?

 

When we are upgrading our websites we can make the application offline. ASP.Net 2.0 introduced a new way of making the application offline when we do some changes or upgradation to our site in production.

 

The trick is, just include a HTML file called App_Offline.htm in the root directory and include some messages on the page. Anyone trying to access the site will be presented with the content in the App_Offline.htm file. ASP.Net will shutdown the app domain and sends back the content of this html file instead for every request.

 

App_Offline.htm

<html xmlns="http://www.w3.org/1999/xhtml" >

<head>

    <title>Untitled Page</title>

</head>

<body>

<h3>We are Upgrading!!! Please visit us later!!!</h3>

</body>

</html>

 

If the above page content is not showing up on your browser, then just do the following changes in your IE. Open IE > Tools >Internet Options> Advanced > Uncheck "Show Friendly Http error messages".

 

Reference

Scott Guthrie

Recent FAQs
  • View All FAQs..