Jun 29, 2008 - 01:31 PM
Develop the page you want to show while your page is offline.
Deploy this webpage to your webserver i.e. to an error subfolder
Add this to your web.config:
If a web page is unreachable the server throws a 404 error. With the above steps you redirect the standard error page to your custom error page. The "Remote Only" setting avoids that you see this page if you access the web page locally i.e. when you are logged on to your server.
If you need to redirect to custom error pages for other codes, do the same as above. Here is a list of all HTTP status codes: http://en.wikipedia.org/wiki/List_of_...
Hope this helps
Aug 03, 2008 - 01:11 AM
I was using the customerrors configuration in the web.config, but what I wanted was a way (in the web.config?) to set the site to "offline" so that any request, not only the errors would be redirected to a specific maintenance page.
I didn't find a solution so I ended up just changing the normal error page to a maintenance page, but I don't think it's very elegant.
Mar 04, 2009 - 07:09 AM
The Quomon Team
Mar 04, 2009 - 07:53 AM
Uploading a file called app_offline.htm in the root of the asp.net 2 directory will automatically shut the site down only showing this page until it's removed again.
Very easy and very useful.