Graphicalwonder - Shane Perran's SharePoint Customization Blog

« AOL Buys Weblogs (25 Mil) | Main | SharePoint 2003 User Guide »

October 10, 2005

Take your ASP.NET 2.0 App Offline Using App_Offline.htm

Scott Guthrie and Eric Porter both have posts on using app_offline.htm.

Basically, if you place a file with this name in the root of a web application directory, ASP.NET 2.0 will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file for example: you might want to have a site under construction or down for maintenance message.

This provides a convenient way to take down your application while you are making big changes or copying in lots of new page functionality (and you want to avoid the annoying problem of people hitting and activating your site in the middle of a content update). It can also be a useful way to immediately unlock and unload a SQL Express or Access database whose .mdf or .mdb data files are residing in the /app_data directory.

Once you remove the app_offline.htm file, the next request into the application will cause ASP.NET to load the application and app-domain again, and life will continue along as normal.

Trackback Pings

TrackBack URL for this entry:
http://www.graphicalwonder.com/cgi-bin/mt-tb.cgi/111

Comments

Post a comment




Remember Me?

(you may use HTML tags for style)

divider.jpg
April 2006
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
divider.jpg
Categories
divider.jpg divider.jpg