What is the easiest way to bring down any website in ASP.NET?

 Posted by Virendradugar on 12/4/2009 | Category: ASP.NET Interview questions | Views: 4524

There is a simple way to bring down your ASP.NET 2.0 application. The only thing you have to do is to create simple html file called App_offline.htm and deploy it to your ASP.NET 2.0 web application root directory. The rest is handled by ASP.NET runtime internal routines.

The way app_offline.htm works is that you put the file in the root directory of the application. When ASP.NET sees it, it will shut-down the app-domain for the application (and not restart it for requests) and instead send back the contents of the App_offline.htm file in response to all new dynamic requests for the application. When you are done updating the site, just delete the file and it will come back online.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response