Configure WCF Service Behavior using database
- by Achhar
We use database to centralize our configuration. As part of it, I want to store the standard service behaviors configuration like expose service metatdata, service debug, service throttling for a service inside database rather than in web/app.config. I was planing to store the configuration for a behavior in database as XML. For e.g. <serviceDebug includeExceptionDetailsinFault=true /
What I am struggling with is once I read this XML from database how do I create ServiceDebugBehavior instance from it and apply it to my service host? I have tried using XML Serializer but didn't had success.
Any thoughts on how this could be achieved or any alternate solutions?