Click here to Skip to main content
16,004,761 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
<b> I have website which is normaly updated after one week and it is real time application .what i want is that when i am updating my website or DB server the user of website can not Access application and database. they simply get a message that a website is under mantaninece and i do not want to use datbase for this purpose .
</b>
Posted

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.
 
Share this answer
 
v2
if want to upload any page i can do it by renaming the page name.
No i want to do this through my application. i have control pannel which control all the activity of the application. Do you have any idea or code through which i can set or reset a variable and my application redirect to undermantainence page.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900