473,788 Members | 2,895 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

customerrors tag doesnt works

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?
my Web.Config file is:

<?xml version="1.0"?>
<configuratio n>
<appSettings>
</appSettings>
<connectionStri ngs>
<add name=..../>
</connectionStrin gs>
<system.web>
<authenticati on mode="Forms">
<forms name..../>
</authentication>
<authorizatio n>
<allow users="*"/>
</authorization>
<customErrors mode="RemoteOnl y" defaultRedirect ="YapimAsamasin da.htm">
<error statusCode="403 " redirect="Yapim Asamasinda.htm"/>
<error statusCode="404 " redirect="Yapim Asamasinda.htm"/>
</customErrors>
<compilation debug="true">
<assemblies>
<add assembly="Syste m.Design, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= B03F5F7F11D50A3 A"/>
</assemblies>
</compilation>
</system.web>
</configuration>

the site is shown as:

Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrorsta g within a "web.config "
configuration file located in the root directory of the current web
application. This <customErrorsta g should then have its "mode" attribute
set to "Off".

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirec t" attribute of the application's
<customErrorsco nfiguration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="RemoteOnl y" defaultRedirect ="mycustompage. htm"/>
</system.web>
</configuration>
Sep 3 '08 #1
3 1697
Tahir wrote:
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?
my Web.Config file is:

<?xml version="1.0"?>
<configuratio n>
<appSettings>
</appSettings>
<connectionStri ngs>
<add name=..../>
</connectionStrin gs>
<system.web>
<authenticati on mode="Forms">
<forms name..../>
</authentication>
<authorizatio n>
<allow users="*"/>
</authorization>
<customErrors mode="RemoteOnl y" defaultRedirect ="YapimAsamasin da.htm">
Try with mode="Off" so that you see the actual error message. That may
help to find out what the main problem is.
Use an url relative to the root instead of an url relative to the
current folder:

~/YapimAsamasinda .htm

That way you get redirected to the same page even if the error occurs in
a page in a subfolder.
<error statusCode="403 " redirect="Yapim Asamasinda.htm"/>
<error statusCode="404 " redirect="Yapim Asamasinda.htm"/>
</customErrors>
<compilation debug="true">
<assemblies>
<add assembly="Syste m.Design, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= B03F5F7F11D50A3 A"/>
</assemblies>
</compilation>
</system.web>
</configuration>

the site is shown as:

Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons). It
could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be
viewable on remote machines, please create a <customErrorsta g within a
"web.config " configuration file located in the root directory of the
current web application. This <customErrorsta g should then have its
"mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirec t" attribute of the
application's <customErrorsco nfiguration tag to point to a custom
error page URL.

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="RemoteOnl y" defaultRedirect ="mycustompage. htm"/>
</system.web>
</configuration>


--
Göran Andersson
_____
http://www.guffa.com
Sep 3 '08 #2
"Göran Andersson" <gu***@guffa.co mwrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Use an url relative to the root instead of an url relative to the current
folder:

~/YapimAsamasinda .htm

That way you get redirected to the same page even if the error occurs in a
page in a subfolder.
I suspect that's the problem i.e. the error is occurring on a page in a
subfolder, and the top-level error message is that the error page can't be
found...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 3 '08 #3
ok, i found that the error was my site isnot configured as .NET 2.0
application >:(
thanks for replies.
"Tahir" <ku*********@gm ail.com>, iletisinde şunu yazdı,
news:97******** *************** ***********@mic rosoft.com...
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?
my Web.Config file is:

<?xml version="1.0"?>
<configuratio n>
<appSettings>
</appSettings>
<connectionStri ngs>
<add name=..../>
</connectionStrin gs>
<system.web>
<authenticati on mode="Forms">
<forms name..../>
</authentication>
<authorizatio n>
<allow users="*"/>
</authorization>
<customErrors mode="RemoteOnl y" defaultRedirect ="YapimAsamasin da.htm">
<error statusCode="403 " redirect="Yapim Asamasinda.htm"/>
<error statusCode="404 " redirect="Yapim Asamasinda.htm"/>
</customErrors>
<compilation debug="true">
<assemblies>
<add assembly="Syste m.Design, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= B03F5F7F11D50A3 A"/>
</assemblies>
</compilation>
</system.web>
</configuration>

the site is shown as:

Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons). It
could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be
viewable on remote machines, please create a <customErrorsta g within a
"web.config " configuration file located in the root directory of the
current web application. This <customErrorsta g should then have its
"mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirec t" attribute of the
application's <customErrorsco nfiguration tag to point to a custom error
page URL.

<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="RemoteOnl y"
defaultRedirect ="mycustompage. htm"/>
</system.web>
</configuration>

Sep 4 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6129
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...
6
1483
by: SMG | last post by:
Hi , Sory for incomplete message in last post here is the actual problem.. I am using following code in web.confiig for trapping all the error through out my site.. <customErrors mode="On" defaultRedirect="WebForm1.aspx"> <error statusCode="404" redirect="ServerError.aspx"></error> <error statusCode="500" redirect="WebForm3.aspx"></error>
0
1305
by: wrytat | last post by:
I tried working with the customErrors tag so that when the user tries to access a page that doesn't exist, it will redirect him to the page not found page. I discovered that it works when my authentication mode is set to None and <allow users="*" /> rather than deny user="?". If I change it to form authentication and deny user = "?", it gives me a server error ("An application error occurred on the server. The current custom error...
0
1319
by: dw | last post by:
Hi, all. I've deployed an ASP.NET 1.1 app from my localhost where it works fine to a server on the network, but when accessed from my machine through the Web, it first asks for me to log into the domain via a popup (which it shouldn't) and then generates this customErrors error, and then when I access the page from the server itself, it still does the popup and then generates the second error below. I think it's permissions on the folder,...
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".
1
1767
by: JJ | last post by:
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:
0
1465
by: Justin Dutoit | last post by:
Hey! I'm sorry if this is a bit of a newbie question, but I am gettting unwanted 'Runtime error' messages, i.e. not the error proper, and customErrors mode="Off" doesnt' seem to work. My web.config file probably needs something- it is below. Please help soon... <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <!-- DYNAMIC DEBUG COMPILATION Set compilation debug="true" to insert debugging symbols (.pdb
15
7902
denny1824
by: denny1824 | last post by:
I have a working website. I copied all the files to a new folder in inetpub/wwwroot and then set that folder as a Virtual Directory in IIS. I try going to that site from the new folder and i am getting a default error page. It is an aspx page that I am trying to view. If I put in a fake page name it gives a different error about that fake name not existing, which means to me that it is seeing the page I want to view but is giving an error...
0
9498
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
10366
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...
1
10110
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
9967
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
8993
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...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
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
2
3674
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.