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 / July 2005

Tip: Looking for answers? Try searching our database.

Configuration Error Not Helpful

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter D. Dunlap - 18 Jul 2005 23:24 GMT
I've got a custom configuration section in my web site and a custom
handler, which all works fine.  However, other people are going to
start working with this site soon, and probably messing with the
configuration.  I've found that if there is an error in my custom
configuration section, the message I get is "Exception in
configuration section handler" regardless of what kind of exception
I'm throwing from inside the handler code.

I can go in and debug the site and find what exception is actually
being thrown, but this is a pain to do, and once others start messing
with things they will be very confused by this.

Is there any way to get it to display a more meaningful error - like
for instance the one I am throwing?
Rakesh Rajan - 19 Jul 2005 07:29 GMT
Hi Peter,

What kind of error in the configuration section causes the exception to be
thrown?

Also, are you talking about 'schema' errors?

Do you also require custom configuration requirements wherein you want
specific attributes as is-required, while other attributes as optional?

Signature

HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/

> I've got a custom configuration section in my web site and a custom
> handler, which all works fine.  However, other people are going to
[quoted text clipped - 10 lines]
> Is there any way to get it to display a more meaningful error - like
> for instance the one I am throwing?
Peter D. Dunlap - 19 Jul 2005 13:01 GMT
>Hi Peter,
>
[quoted text clipped - 5 lines]
>Do you also require custom configuration requirements wherein you want
>specific attributes as is-required, while other attributes as optional?

It doesn't matter what kind of error it is.  A recently added xsd
schema validation, and any error that gets thrown from that gets this
generic message.  Previously I was not using a schema and had my own
error checking and threw my own exceptions, and the messages from
those exceptions never got displayed.

In this particular case all attributes are required.  I have another
portion of the site which uses xml files and those have some optional
attributes (I specify a default value for them in the schema).
Exceptions thrown by that validation show up in full on the browser
when they happen.  Exceptions thrown by the configuration code result
in an unhelpful generic message that does not indicate what the
problem is.

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.