Last post Feb 13, 2012 03:27 PM by Matt in Cambridge
Feb 13, 2012 02:03 PM|Matt in Cambridge|LINK
When I want to upgrade my database, I need to bring down the main site so that users don't affect the database while it's schema and data are being updated.
I was wondering how others have been able to put up a "maintenance page" that says something like "This site is currently undergoing maintenance. Please check back shortly."
Currently, I have created a configuration setting in web.config, and every time my main default.aspx loads, it checks to see if MaintenanceMode=true. If yes, it redirects to the maintenance page. This allows me to log into my server, change the web.config
file, and now the whole site redirects to the maintenance page.
The only problem I see with this, is that accessing web.config for every page load might be inefficient. However, a roundtrip to the database to check a setting like this seems even more inefficient.
Does anyone have any good ideas about this?
Feb 13, 2012 02:07 PM|hans_v|LINK
Feb 13, 2012 03:27 PM|Matt in Cambridge|LINK
Perfect, thanks! I knew Microsoft had to have thought of this.