App_Offline.htm in ASP.NET

If you place a file with the name 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.

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).

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 it will be back to normal.

If you place a file with the name 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.

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).

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 it will be back to normal.

Limitation:

Note that the file must be at least 512kb in size or it will not work. This a well known ‘limitation’.

Posted

in

by

Tags:


Related Posts

Comments

One response to “App_Offline.htm in ASP.NET”

  1. ultrasound technician Avatar
    ultrasound technician

    Valuable info. Lucky me I found your site by accident, I bookmarked it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading