Nothing is perfect specially our software world 😀 everyday we have some new to learn to do to face (i meant by errors :() ok lets back to the point sometimes we need to update/work on our live server where our web app is hosted or have to temporarily take to our web app from online to offline 🙂 then what we can do if ask to any code he/she just say start coding somewhere put logics and blah blah blah but if you think by the mind of architect u could have many alternatives like following ways 😛
- Stop IIS 😀 haha i think bad way coz by this each web application will be down
- Redirect each request to any such page on which u have mentioned your application is temporarily offline.
- set <httpRuntime enable=false under <system.web> this approach is not bad if your whole application is in asp.net because your other web resources like .htm, .css, .js and images would be accessible
- creating/having App_Offline.htm on the root. if you are running asp.net app then your application automatically go offline due to this page. each page request will be redirect to this page. no need to do any settings explicitly as its asp.net 2.0 feature but not for asp.net 1.x sooooooo :s
so best of luck.