Configurations

Topics: Exception Handling Application Block, Logging Application Block
Mar 23, 2011 at 9:44 AM

Hi,

 

We plan to have different config files for database,logging and the exception Block.

But the Exception requires the the logging settings to log exceptions.

When we create the Logging setting in Log.config it has to take the connection string from DataBase.config file.

Similarly The Exception.Config should read the Log.config for exception logging.

How can we achive this.

Thanks,

Mar 23, 2011 at 10:19 AM

You can redirect your main config file to your exception.config, logging.config and database.config file.  Each of the redirect config file can refer to the other redirected files although there are properties which you  must manually type such as the connection string for a database trace listener as the tool won't be able to show the connection strings from the redirected config file.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com 


Mar 31, 2011 at 4:46 AM

Do you mean redirect the config flatly?

like app.config <- exception.policy.config

                      <- connectionString.config

                      <- logging.config

 

Is it supported in EL5.0 to redirect the config as a hierarchy?

Such as app.config <- exception.policy.config <- logging.config <- connectionString.config

                            <- connectionString.config

Mar 31, 2011 at 4:51 AM
Edited Mar 31, 2011 at 4:51 AM

Yes, redirect the main config to the other ones.  I tried the hierarchy since there isn't a direct statement whether it's supported and saw that it isn't supported.

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com