473,505 Members | 16,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CustomErrors not working on live host

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
1 1745
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1479
by: reza | last post by:
Hi, I am trying to use a customErrors configured in web.config: Have tried mode being 'On' or 'Remote' and have a page specified as defaultRedirect. However, everytime I tried to run it from debug,...
6
6101
by: John Smith | last post by:
I am trying to implement custom error pages and I get this error message: **************************************************************************** ********...
10
2833
by: Ron Weldy | last post by:
I am working on a website that someone else has set up. They have a web.config file with a customerrors element that points the error handling to a special aspx page. <customErrors...
1
6517
by: Chumley Walrus | last post by:
I'm having trouble seeing my page when I publish it on my live server. I created a project in VS.net (with MMIT integrated), created a simple index.aspx mobilewebform page , I can see it in my...
5
39000
by: Savas Ates | last post by:
I have a web application It works well in my local folder.. When i upload it to my web server i got To enable the details of this specific error message to be viewable on remote machines,...
2
3483
by: Max Metral | last post by:
I'm trying to set the default behavior of customErrors in the machine.config. The documentation seems to suggest this should work, but it doesn't seem to work for me. On my development machine, I...
1
1774
by: kristian | last post by:
I'm using the following entry in my web.config: web.config <customErrors mode="On" defaultRedirect="~/CMS/Default.aspx"> <error statusCode="404" redirect="~/CMS/Default.aspx"/> </customErrors> ...
9
4256
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi. Is it programatically possible in VB.NET to read the contents of web.config's <customErrorselement? I looked at using ConfigurationSettings.AppSettings, but that doesn't work. I need to...
3
1682
by: Tahir | last post by:
Hi, i am delevoping an ASP.NET website which worked well on my old web host and now working on localhost but now it doesnt works on my new host. i have new registered and ftp the files that...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.