G
Guest
I was creating a Custom Configuration section in my web.config.
I noticed that if I set a property like:
[ConfigurationProperty("EmailAuthorizationFailures", IsRequired = true)]
<MySection
EmailAuthorizationFailures="true"
/>
and I neglected to put the entire MySection in the web.config. I don't get
an error. Additionally if I actually read the section using
GetConfig("MySection") it comes back full of values (DefaultValue or
ValueType defaults ). I thought it would be NULL.
I would like to throw an exception if the user forgets to put in the
section in the web.config.
Is their a way to test for the missing section?
thanks,
I noticed that if I set a property like:
[ConfigurationProperty("EmailAuthorizationFailures", IsRequired = true)]
<MySection
EmailAuthorizationFailures="true"
/>
and I neglected to put the entire MySection in the web.config. I don't get
an error. Additionally if I actually read the section using
GetConfig("MySection") it comes back full of values (DefaultValue or
ValueType defaults ). I thought it would be NULL.
I would like to throw an exception if the user forgets to put in the
section in the web.config.
Is their a way to test for the missing section?
thanks,