Taking an ASP.NET Application Offline

Posted: February 18, 2011 in ASP.Net

If you place a file called app_offline.htm 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. Basically all requests will be sent back to the content of the file app_offline.htm. You can put details in this file about why the application is offline like “under construction” or “down for upgrade” perhaps.

This provides a very quick way to take down your application. This will let you make changes to the application in the background and stop users from accessing your pages while you are working on it. Once you remove the file app_offline.htm, the next request into the application will cause ASP.NET to load the application and app-domain again, and your application will be back to normal.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s