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

I've been trying to find a way to load my WCF service configuration (that huge BLOB of XML config data) from an alternate source - not the standard web.config / app.config.

We're running in a restricted environment where we don't have access to the server's file system, and thus we cannot make tweaks and changes to our WCF configs ourselves - we always have to find IT managers to handle that. We've put our entire configuration into a sQL Server database and trimmed down the web.config basically to a section - that's it.

Now, we were wondering if there's a nice, documented way to do the same for WCF - is there a mechanism to plug in a "config provider" of sorts? Could we somehow store our config entries in a database table and feed them to the services as they start up?

I haven't been able to find any really useful and understandable documentation and samples on this..... any takers here?!?!


You can do this, it's a little bit of work though.

On the service side, You'll have to create your own custom ServiceHost and override the ApplyConfiguration method.

Check out this blog post

On the client side, you do something similar, but provide a custom ChannelFactory and override the ApplyConfiguration method there.

Need Your Help

DevExpress ASPxRichEdit - The “Cannot read property 'columnOffset' of undefined” JavaScript error

javascript webforms devexpress

Basically what I am trying to accomplish is putting an ASPxRichEdit inside a popup control so when a user double clicks on a job it'll bring up the notes for said job in a popup controller. However...

Silly syntax error c++

c++ syntax

I'm completely new to C++.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.