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