By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,536 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

CustomErrors not working on live host

P: n/a
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

Jun 4 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
"JJ" <ab*@xyz.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
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

Jun 4 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.