Setting Configuration Detail Per Web Service Request??

Topics: Building and extending application blocks, Data Access Application Block, Enterprise Library Core, General discussion, Logging Application Block
Oct 20, 2007 at 2:11 AM
I am evaluating the best & simplest way to assign .config information per web service requester (.asmx, not WCF)
The driving requirement is to increase/decrease logging for specific caller(s) instead of all, as well as, to specify different listener output names to provide separation when multiple requesters are being logged/traced. I can see this extending into policy, security, etc as well.

Three ways I think this can be done:
1) Set the config via SqlConfigurationSource during authentication
-- what cannot be loaded dynamically?
2) Create a custom filter
-- additional coordination required when implementing PIB/Security?
3) Do it all in code
-- least flexible after deployment.

Id really like to hear opinions/thoughts from those more intimate with entlib than I since there are soooo many factors to consider. Ironically, all of these 'factors' are what also makes EntLib so fantastic! -- anyway,

I thank you for your time.

Oct 24, 2007 at 4:17 PM

How will you differentiate the caller ?

Chaining logging for specific callers makes little sense to me bi\ut for roles yes...


Then admin function would be in an admin category.

Which requester can be added to the loging context.

Id avoid db acces while authenticating there is a good reason authentication is cached ( unless you have very few users)

Regards,

Ben
Oct 24, 2007 at 11:15 PM
Edited Oct 24, 2007 at 11:17 PM
How will you differentiate the caller ?
I will be grouping requests based upon a UID required in the request header. The goal is to segregate logs based on this UID, and be able to increase/decrease logging verbosity of a UID independently of another UID.

Id avoid db acces while authenticating there is a good reason authentication is cached ( unless you have very few users)
Agreed. I intend to create a cache (which will coordinate with the db) that is used for this process by all requests within an applicationDomain
Oct 28, 2007 at 9:59 AM
Id like more input on this please :)