473,796 Members | 2,658 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 1767
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.comwro te in message
news:%2******** ********@TK2MSF TNGP06.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
1491
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, I get this messege: ..... Sever side-error occured on sending debug HTTP request. Thanks in advance, Reza
6
6130
by: John Smith | last post by:
I am trying to implement custom error pages and I get this error message: **************************************************************************** ******** **************************************************************************** ******** Server Error in '/mfg' Application. ---------------------------------------------------------------------------- ----
10
2859
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 mode="RemoteOnly" defaultRedirect="/customerrors/500.aspx"> <error statusCode="404" redirect="/customerrors/404.html" /> </customErrors> When running pages directly on the server it still redirects when a error occurs, even though it should not judging by...
1
6546
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 Mobile Explorer emulator , but get the following error when trying to look at it from my remote server, even when changing the CustomErrors mode to Off: Details: To enable the details of this specific error message to be viewable on remote...
5
39034
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, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
2
3504
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 want customErrors off, and on my production machine I want them to go to a friendly error page (so on with a defaultRedirect). No matter what I do, I only get "customErrors off" with setting in machine.config and not web.config. Any thoughts?...
1
1797
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> And this is in the Global.asax Global.asax void Application_Error(object sender, EventArgs e) {
9
4274
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 read the value of redirect from the error statusCode 404. My web.config looks like this: <customErrors mode="RemoteOnly" defaultRedirect="Error.aspx"> <error statusCode="404" redirect="Error404.aspx" /> </customErrors>
3
1699
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 work on previous host. now it shows the classic runtime eror page which explains how to enable customerrors tag. the problem is my website is configured to show my custom error page. what is the problem? why the customerors tag doesnt work?
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9533
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10461
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10239
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10190
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10019
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9057
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4122
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 we have to send another system
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.