Register  |  Login

Question Details    

   Question

Time: 13:57 - Jun 26, 2008     Asked by: dave      Status: Unanswered      Points: 25   

how do i set my asp.net site to show a maintenance page, while it's offline?

is there any way to do this though the web.config file?

Ask a New Question

Become a Quomon Expert

Current Categories

 

Other Questions Needing Answers


   

Answer Discussion
Answer Discussion
Answer Summaries
Answer Summary
 
These are the steps you should do:

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:

<configuration>
<system.web>
<customErrors defaultRedirect="/errors/default.aspx" mode="RemoteOnly">
<error statusCode="404" redirect="/errors/404.aspx" />
</customErrors>
</system.web>
</configuration>

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_HTT...

Hope this helps

Cheers

Peter

Expert:

PeterNZ

Date:

Jun 29, 2008

Time:

16:31

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Thanks Peter.
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.

Expert:

dave

Date:

Aug 03, 2008

Time:

04:11

 

Votes: Good (0) | Bad (0)
Login to rate this answer

 

Answer Summary Currently Unavailable.

Answer Summaries cannot be submitted until the Answer Discussion is complete.

If you have an Answer for this question, submit it in the Answer Discussion area.




Respond to this question:

New User

  Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:


Forgotten Password

 

   

"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it


All Questions


Language Options

English:

www.quomon.com

Español:

www.quomon.es

Sponsors

Questions and Answers Software
Real Estate Postcards
Marketing Fulfillment