Setting <customErrors mode="Off">

W

Winshent

I get this problem and cant sort it.. i have read a number of threads
which all seem to point to the fact that it does work..

However, i am connecting to a remote SQL Server and the webserver is
also remote. I cannot debug either.

I have read that i might need debugging permissions on the web server?
Is this the case? The Server OS is windows 2003 so i presume its
running IIS.

The server is in the same office so i should be able to get access to
it.

the error message is as follows:

--------------------------------------------------------------------------------
Server Error in '/myWebApp' 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>
 
B

Ben Lucas

You're actually not seeing the underlying error because you are accessing
the web page from a remote machine. Your web.config will have the
<customErrors> setting which should be set to "Off" if you want to see the
detailed error message from a remote machine. The other option is to set
<customErrors mode="RemoteOnly"> and then connect to the website while on
the webserver itself.

Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com
 
W

Winshent P

Ben

Thanks for your response..

I do actually have the customErrors mode set to Off, hence the subject
title. So i dont know whats going wrong.

getting access to the webserver may be possible but i would prefer to
sort this from my local machine.

Are there debugging permissions that can be set in IIS or am i barking
up the wrong tree?
 
B

Ben Lucas

That is bizarre.

You've probably already thought of these things, but I would check to make
sure that the web.config you are checking is for the application you are
using (ie. in the /myWebApp directory). Also, check to see if you have the
customErrors tag more than once, and if it is in the correct part of the
web.config. It should be contained within the <system.web> node.

Also, if none of this helps, try accessing your web application from the
webserver itself, and see if that displays a different error.

Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com
 
W

Winshent

Ben

I am modifying the web.config file was created with the rest of the
project, so i assume this is ok.

Have checked that there is only one customerrors tag, and it is within
the system.web tag so thats ok as well.

Any other ideas?

Its not possible for me to be developing on the server.

Thanks

Vincent
 
M

mikeb

Winshent said:
Ben

I am modifying the web.config file was created with the rest of the
project, so i assume this is ok.

Have checked that there is only one customerrors tag, and it is within
the system.web tag so thats ok as well.

Any other ideas?

Make sure there is not an allowsOverride="false" setting in
machine.config or some other web.config that gets applied before you
application's web.config settings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top