WCF Configuration - Split it out of app.config

前端 未结 8 1612
耶瑟儿~
耶瑟儿~ 2020-12-10 02:38

I have a specific requirement to remove all client WCF configuration () out of the main app.config file, and into a separate XML file. The behav

8条回答
  •  不思量自难忘°
    2020-12-10 03:03

    I've been longing to do the same - basically even one step further: put my WCF config in a database table (since I can change that - can't access the file system on my hosted provider to change config files :-().

    Unfortunately, this seems less than simple.....

    Basically, it boils down to having to write your own custom "ServiceHost" descendant which can handle the configuration as needed.

    Here's an example of loading WCF configuration from a custom config location.

    This might get you going? I'm still hoping I'll be able to figure out the "loading my config from a database table" some day..... just need to quiet week at work, I guess :-)

提交回复
热议问题