PC Review


Reply
Thread Tools Rate Thread

CustomErrors not working on live host

 
 
JJ
Guest
Posts: n/a
 
      4th Jun 2007
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



 
Reply With Quote
 
 
 
 
JJ
Guest
Posts: n/a
 
      4th Jun 2007
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CustomErrors OFF not working? Darrel Microsoft ASP .NET 3 23rd Feb 2009 06:58 AM
customErrors working too well on project open =?Utf-8?B?VG9tIFBvdHRz?= Microsoft Dot NET 1 8th Sep 2004 04:25 PM
RE: customErrors element not working Jim Cheshire [MSFT] Microsoft ASP .NET 0 28th Jul 2004 10:32 PM
IIS 5.0 + Win 2000 Server + .NET 1.1 => customErrors stopped working... Frank Microsoft ASP .NET 1 16th Jun 2004 09:54 PM
<customErrors .... not working?? =?Utf-8?B?cmV6YQ==?= Microsoft ASP .NET 1 18th Feb 2004 11:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:08 AM.