Nikolaos Kantzelis ASP.Net Blog

This blog will focus on ASP.NET Framework

Sponsors

About Me

Great Blogs

Take an ASP.Net application offline

In this post (it is going to be very short for a change) I would like to show you how to take your ASP.Net application offline.

We have to place a file named app_offline.htm into your root directory.By doing that we stop any ASP.Net processing. If you wonder what is going to be displayed instead,

are the contents of the  app_offline.htm. If we remove the app_offline.htm  or rename it, then the ASP.Net application will start again.

1) Launch Visual Studio and create a new ASP.Net web application.Give it an appropriate name.

2) Add a new app_offline.htm file to the root of your application. I have added some markup in this file

<p>We apologise for the inconvenience but our site is down for maintenance!!!
 We  expect this to last for a couple more hours. Please try again later </p>
<p>If you want to have a look at our company's profile have a 
look at some <a href="#">videos</a> in YouTube</p> 

3) Run your application and you will see the contents of the app_offline.htm file

4)  Rename the app_offline.htm file to something else and you will see your application up and running. You can delete the file if you want.

So  I think this is a great way to take your application off and bring it back on with minimum effort.

Hope it helps!!!

Comments

Dot Net Rules said:

In this post (it is going to be very short for a change) I would like to show you how to take your ASP.Net

# September 24, 2011 1:44 PM

Take an ASP.Net application offline | ASP.NET, Visual Studio | Syngu said:

Pingback from  Take an ASP.Net application offline | ASP.NET, Visual Studio | Syngu

# September 25, 2011 1:34 AM

Take an ASP.Net application offline said:

Pingback from  Take an ASP.Net application offline

# September 25, 2011 3:20 AM

buy oem software said:

jYg2r4 Thanks so much for the post.Really looking forward to read more.

# May 2, 2012 7:20 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)