Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

customErrors mode="off"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nicholas - 19 Jan 2005 17:46 GMT
Although in my web.config I have <customErrors mode="off" /> I still get no
detailed errors.
How comes ?

THX

This is what I get:

Server Error in '/mywebfolder'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 <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".

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

<configuration>
   <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 "defaultRedirect" attribute of the application's
<customErrors> configuration tag to point to a custom error page URL.

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

<configuration>
   <system.web>
       <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
   </system.web>
</configuration
Leszek Taratuta - 19 Jan 2005 17:52 GMT
1. Are you using multiple web.config files? Check all of them.
2. What about machine.config?

Leszek Taratuta

> Although in my web.config I have <customErrors mode="off" /> I still get no
> detailed errors.
[quoted text clipped - 39 lines]
>     </system.web>
> </configuration
nicholas - 19 Jan 2005 17:58 GMT
1) All web.config have customerrors = off
2) I'm not using a machine.config, what is this for?

THX for your reply !
Nic.

> 1. Are you using multiple web.config files? Check all of them.
> 2. What about machine.config?
[quoted text clipped - 53 lines]
> >     </system.web>
> > </configuration
Leszek Taratuta - 19 Jan 2005 18:19 GMT
The machine.config file provides settings for the entire machine, not only
for a single Web Application.
It resides in the .NET directory. On my machine it is:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG
Try searching your hard-drive for machine.config.
This file contains <customErrors mode="RemoteOnly"/> by default.
Anyway this file (machine.config) is taken into account only when you do not
have web.config, so it is unlikely source of your problem.

Also check web.config that provides settings for your application. Maybe you
have multiple <customErrors> nodes. They might override their settings.

Leszek

> 1) All web.config have customerrors = off
> 2) I'm not using a machine.config, what is this for?
[quoted text clipped - 61 lines]
> > >     </system.web>
> > > </configuration
nicholas - 19 Jan 2005 18:38 GMT
- The website is hosted, so I cannot check for the machine.config.
- my web.config has just 1 customerror line

On my testing server I see the detailed error.

realy weird ....

> The machine.config file provides settings for the entire machine, not only
> for a single Web Application.
[quoted text clipped - 77 lines]
> > > >     </system.web>
> > > > </configuration
jose rodriguez - 07 Aug 2005 17:38 GMT
antonio balbas - 19 Aug 2005 16:53 GMT
Bob Lehmann - 19 Jan 2005 18:15 GMT
I believe it's case-sensitive - "Off", not "off".

Bob Lehmann

> Although in my web.config I have <customErrors mode="off" /> I still get no
> detailed errors.
[quoted text clipped - 39 lines]
>     </system.web>
> </configuration
nicholas - 19 Jan 2005 18:31 GMT
in my web.config it is OK: Off

THX anyway

> I believe it's case-sensitive - "Off", not "off".
>
[quoted text clipped - 52 lines]
> >     </system.web>
> > </configuration
Bob Lehmann - 20 Jan 2005 01:09 GMT
That's not what you wrote.

Bob Lehmann

> in my web.config it is OK: Off
>
[quoted text clipped - 58 lines]
> > >     </system.web>
> > > </configuration
Juan T. Llibre - 19 Jan 2005 18:33 GMT
Are you sure that the web.config is in a directory
marked as an Application or a Virtual Directory in IIS ?

If it is not, the web.config in the root directory,
or the settings in machine.config, will decide whether
custom errors will be displayed.

The default setting for custom errors in asp.net 1.1 is :
<customErrors mode="RemoteOnly" />

The possible settings are :

On : Always display custom errors

Off : Always display *ASP.NET* error pages
( Notice: this does *not* mean that no error messages
will be displayed. It means that ASP.NET error messages
will be displayed.

RemoteOnly : Display custom errors to remote
clients and ASP.NET errors to localhost

It could very well be ( in fact it probably is )
that you're seeing an ASP.NET error message,
and not a *custom* error page being displayed.

btw, in IE, do you have "Show friendly HTTP error messages"
selected in "Tools", "Internet Options", "Advanced" ?

Juan T. Llibre
ASP.NET MVP
===========
> Although in my web.config I have <customErrors mode="off" /> I still get
> no
[quoted text clipped - 46 lines]
>    </system.web>
> </configuration
nicholas - 19 Jan 2005 18:54 GMT
Hi,

> Are you sure that the web.config is in a directory
> marked as an Application or a Virtual Directory in IIS ?
As it is hosted, I can't see if they did it OK, unfortunately.

> It could very well be ( in fact it probably is )
> that you're seeing an ASP.NET error message,
> and not a *custom* error page being displayed.
I know the error message, my hoster forwarded it to me.
It is a message that says that the sql-server cannot be found.
So there was a problem in my connection string.
That is solved. But I would like to understand why I couldn't see the error.

> btw, in IE, do you have "Show friendly HTTP error messages"
> selected in "Tools", "Internet Options", "Advanced" ?
No.
If  I generate the same error on my testing server, I can see the error.

Conclusion:  I think the problem situates itself at the hoster.
Must be some virtual directory thing.

Thx a lot!
Nic

> Are you sure that the web.config is in a directory
> marked as an Application or a Virtual Directory in IIS ?
[quoted text clipped - 79 lines]
> >    </system.web>
> > </configuration
Scott Simons - 19 Jan 2005 20:17 GMT
It sounds like you are accessing the page remotely and not locally.  Doing so
will also cause this to happen.  I believe there is something along the lines
of remoteerrors in the web.config that you have to turn on.
jose rodriguez - 07 Aug 2005 17:36 GMT
natural cures, I made an erro on the application
jose rodriguez - 07 Aug 2005 17:38 GMT
natural cures, I made an error on the application
Suhaib Khan - 19 Jan 2005 21:01 GMT
I'm not sure whether this problem is related to what I had, but still I'm
sharing it over here. On one of my production server my application was
throwing exception from Application_OnStart event but it was not getting
displayed in the browser window. In the end I had to capture this error in
Application_OnError event and that solved my problem.

This happened with .NET 1.1.

> Although in my web.config I have <customErrors mode="off" /> I still get no
> detailed errors.
[quoted text clipped - 39 lines]
>     </system.web>
> </configuration
Chuck Green - 23 Jan 2005 17:53 GMT
I get that exact same error when I try to use MSN Messenger, how do I
fix it?  Please e-mail me if you can help.  Thanks.
Gema . - 08 Feb 2005 20:03 GMT
PLEASE, HELP ME!!
MY MSN MESSENGER PROGRAM HAS AN ERROR AND I DON?T KNOW HOW CAN I DO TO
REPAIR. PLEASE, SEND ME THE SOLUTION.

gemma_queen_33@hotmail.com
Juan T. Llibre - 08 Feb 2005 20:32 GMT
Don't get your panties in a bunch.

The MSN Messenger service is down.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espa?ol
=====================

> PLEASE, HELP ME!!
> MY MSN MESSENGER PROGRAM HAS AN ERROR AND I DON?T KNOW HOW CAN I DO TO
[quoted text clipped - 4 lines]
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Karen Younts - 16 Mar 2005 17:27 GMT
Lucy Lou
luckyme999@aol.com
Ashley Kelly - 18 Jul 2005 22:54 GMT
lisa - 27 Oct 2007 20:34 GMT
i cannot read my page

From http://yq.search.yahoo.com/yq/searc
Mark Rae [MVP] - 27 Oct 2007 21:13 GMT
>i cannot read my page
> From http://yq.search.yahoo.com/yq/search

What does this have to do with ASP.NET?

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.