CustomErrors not working on live host

J

JJ

I've a strange problem:

My customErrors section in my web.config doesn't seem to be working on the
live host. By that, I mean that when I type in an address of a page that
doesn't exist, I get the standard 404 error page and not my custom one.

It works fine on both my visual studio web server and my local IIS, with
exaclty the same web.config.

The custom error section reads:
<customErrors mode="On" defaultRedirect="~/Error.aspx">
<error statusCode="404" redirect="~/Error.aspx?code=404"/>
<error statusCode="408" redirect="~/Error.aspx?code=408"/>
<error statusCode="505" redirect="~/Error.aspx?code=505"/>
</customErrors>


The page 'Error.aspx' works fine and is in the root of the site.

The strange thing is that the standard 404 error page gets displayed really
quickly - as if the hosts IIS isn't checking the web.config file. I've asked
them and they say all is ok at their end.

Any ideas?

JJ
 
J

JJ

It turns out that it was someething in the IIS metabase config - whatever
that is. The host copied a file from a working site and my site suddenly
worked as expected....
JJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

customErrors 1
<customErrors 3
CustomErrors! What is going on? 0
HTTP Error 404 1
Read <customErrors> element via VB.NET Code? 9
CustomError Problem 4
customerrors tag doesnt works 2
Error Handling Question(1) 3

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top