Question

I need to be able to store the XML of my web.config serviceModel element in a database, and have my application read it at startup. Is there a way to do this by just changing my startup code to "override" the serviceModel element in the .config file? I see there is an answer to another question about doing this for the appSettings section here.

How can I do this for serviceModel?

No correct solution

OTHER TIPS

Sure - you can load a service model configuration from any config file you wish :-) No problem at all.

If you need to do this frequently, you might want to consider creating your own custom ServiceHost class. On how to do this, see this excellent blog post, or this one in particular for hosting a service inside IIS.

Marc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top