Loading WCF configuration (for server + client) from a custom source (not standard XML)

I am trying to find a way to load the WCF service configuration (this huge blob of XML configuration data) from an alternative source, rather than the standard web.config / app.config file.

We work in a limited environment where we do not have access to the server file system, and therefore we cannot make settings and changes in our WCF configurations on our own - we always need to find IT managers to deal with this. We included all of our configuration in the SQL Server database and trimmed the web.config file mainly into a partition — that’s it.

Now we were wondering if there is a good, documented way to do the same for WCF - is there a mechanism for connecting a “configuration provider”? Could we somehow save our records in the database table and transfer them to services during their launch?

I could not find really useful and understandable documentation and samples on this ..... any participants here?!?!

+5
source share
1 answer

You can do it, but it works a little.

On the service side, you will need to create your own ServiceHostand override ApplyConfiguration.

Mark this blog post

- , ChannelFactory ApplyConfiguration.

+6

All Articles