Taking your ASP.Net Web Application Offline#

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 10:54:42 AM (India Standard Time, UTC+05:30) #    Comments [4]  |  Trackback

 

All content © 2010, Kiruthik Nandha Kumar
On this page
This site
Calendar
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Sitemap
Blogroll OPML
Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail