customerrors tag in web.config

C

Chumley Walrus

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 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>



????
chumley
 
J

Juan T. Llibre

You may be mixing up the error messages.

The customErrors Attributes are

mode="[On|Off|RemoteOnly]"

On: Always display custom errors
Off: Always display ASP.NET error pages
RemoteOnly: Display custom errors to remote clients
and ASP.NET errors to localhost
defaultRedirect="url" - Url to redirect client to when an error occurs

There's no way you'll get custom error messages,
if you set customErrors to "off", as in

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

That way, you'll only get ASP.NET error messages.

You need to set <customErrors mode ="RemoteOnly"/>
if you only want remote clients to see your custom error
messages.

or

You need to set <customErrors mode ="On"/>
if you want your custom error messages to be
displayed both locally and to remote clients.




Juan T. Llibre
ASP.NET MVP
===========
 

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

Similar Threads

customerrors tag doesnt works 2
Web.Config - customErrors 6
<customErrors mode="Off"/> PROBLEM 1
"customErrors" in "web.config" 8
customErrors 1
customErrors error 0
customErrors mode="off" 20
Help with Web.config 1

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top