Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can we temporary off the running website & gives a message "This site is Temprorary unavailable", actully i want to gives a power to admin he can temporary on/Off the website. Is this could be possible in asp.net.
according to my need i dnt want to add web_offline.htm page. I simply do it by button control i.e. Active website & Deactive website(dynamic method)..
Posted
Updated 12-Apr-12 21:29pm
v2

Create a simple htm file with name app_offline.htm and place it in the root of your website. This file will load automatically whenever any web page is requested from your site.

http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx[^]

You can manually remove/rename this file when you want to make your website accessible or write some code for the same.
 
Share this answer
 
Comments
Mas11 13-Apr-12 2:55am    
Okk but according to my need i dnt want to add web_offline.htm page. I simply do it by button control i.e. Active website & Deactive website(dynamic method).
You can have a page with the above message and direct all the pages load (or atleast the home) to this page till your maintenance done.
 
Share this answer
 
Comments
Mas11 13-Apr-12 2:19am    
dear lakamraju how can we load all pages with that error pages, can you explain briefly.. or write code if you can..
Mas11 13-Apr-12 2:34am    
lakamraju please explain me how can i loaded all pages with that error pages.. I try so many method but till now i dont get a success.. I try over it from last two days.. please help me if you can..
Mas11 13-Apr-12 3:21am    
Okk but according to my need i dnt want to add web_offline.htm page. I simply do it by button control i.e. Active website & Deactive website(dynamic method).

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