Kiruthik Speaks on ......

 Thursday, January 11, 2007

Taking your ASP.Net Web Application Offline

My work mostly revolves around ASP.Net based Projects, and so I frequently come across a situation where I release the application (or a part of it - may be dll ) for Testing, when someone is accessing. Generally I used to delete the web folder and install the new one after a informal notification. For this I cant stop or pause the Web server, as some other web application is running side by side will get affected. In times, I will just replace the web folder as such (taking advantage of the xcopy deployment). Its not the exact way to do so!!

At last I found the solution for this : Simply add a file called app_offline.htm to your root of the web folder. The application wont respond to any of the further requests. It just throws  404 - Error ( The resource cannot be found. )

app_offline.htm  - can be a empty file. This is a simple way to bring your application Offline!

To bring it back (making it online is so simple - deleting the file app_offline.htm will do!

I have checked with ASP.Net 2.0, and not tried with ASP.Net 1.1 Even I dont know whether this feature is there in ASP.Net 1.1

[Source]

1/11/2007 5:24:42 AM UTC  #    Disclaimer  |  Comments [4]   
1/12/2007 4:25:26 AM UTC
Taking application offline.......
http://www.vikramlakhotia.com/Taking_an_ASPNET_20_Application_Offline_at_will.aspx
1/12/2007 4:30:50 AM UTC
Hi Vikram, I didn’t understand why u hv given your link in the comment ?
Kiruthik
1/22/2007 3:15:03 AM UTC
Hi,

nice to hear from you. I choose WP for three reasons 1. It has damn good features, 2. linux hosting is cheaper, as a starter i would like to start with linux hosting, 3. This is the chance for me to learn PHP.

So, howz life going buddy?
1/22/2007 3:52:52 AM UTC
3 Point is really worth, even im planning for the same in one of my blog!!

:)
Kiruthik
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):