Loading the WCF configuration from different files

2019-02-10 07:28发布

A common problem in WCF that many people face is the impossibility of loading the client configuration from different configuration files.

This is a common scenario when the developer wants to deploy some binaries with along with an independent configuration file (Which may be in a resource file also or another configuration file) to avoid modifying the main configuration file.

I have found two references:

http://weblogs.asp.net/cibrax/archive/2007/10/19/loading-the-wcf-configuration-from-different-files-on-the-client-side.aspx

http://social.msdn.microsoft.com/forums/en-US/wcf/thread/f33e620a-e332-4fd4-ae21-88c750437355/

which is the best solution about it ??

any suggestions for a the best solution ? I use VS 2008 and .NET 3.5.

1条回答
男人必须洒脱
2楼-- · 2019-02-10 08:07

The first link (blog post) is more relevant to your situation. Your only other option would be to use WCF Discovery to discover your endpoint and configuration at runtime, but that approach is certainly more work and can get complicated in managed mode.

查看更多
登录 后发表回答