By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,620 Members | 1,512 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,620 IT Pros & Developers. It's quick & easy.

<Custom Error> ???

P: n/a
dear all,

i am a bit confused on the way custom error are handling and occurs.
First of all I have understand that customer error is used to defined more
user friendly message to my end user and that custom errors mask out more
details error if the web side is access from the local web server browser

right ?

If it is so I have read that setting the mode attribute to OFF in web.config
files will disable custom errors and send more details error instead.

Does this will remove custom error from my end users or only from Local web
server browser ?

What to do then to be able to send custome error to my end user but details
error only from my web server, is it the RemoteOnly attribute ?

regards
serge

Nov 27 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Serge,

I think your confused, or you got me confused anyway :-)
In asp.net or in any other program for that matter, you want your end users
to recieve an error without revealing information about how the internals of
your system work.
This is because you don't want the bad guys to hack there way into your
system and of course sending a message containing error codes isn't really
user friendly.

The RemoteOnly attribute takes care of this part you can set is to true or
false depending on the situation your in. In development you can allow debug
information to be send to the client in production you don't want this to
happen.

-----
The second part of the story in adding your own exceptions to the code. You
can do this to add information to the probably already excisting exception.
The framework itself profides examples for this. Take the ArgumentException
and the ArgumentNullException. ArgumentNullException inherits the
ArgumentException but is more specific this exception gets thrown when a
argument on a method call is not allowed to be null. While the
ArgumentException gets thrown when there is something wrong with a passed
argument.

There is a lot about exception handling that can be said to muth to be
dealed with in this reply.

The default settings take care of most of the problems.

You can add the some error handling code in your global.asax to make sure
you handle every error in your application.

Good luck,

--
Rainier van Slingerlandt
(Freelance trainer/consultant/developer)
www.slingerlandt.com
"serge calderara" wrote:
dear all,

i am a bit confused on the way custom error are handling and occurs.
First of all I have understand that customer error is used to defined more
user friendly message to my end user and that custom errors mask out more
details error if the web side is access from the local web server browser

right ?

If it is so I have read that setting the mode attribute to OFF in web.config
files will disable custom errors and send more details error instead.

Does this will remove custom error from my end users or only from Local web
server browser ?

What to do then to be able to send custome error to my end user but details
error only from my web server, is it the RemoteOnly attribute ?

regards
serge

Nov 27 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.