Loading the WCF configuration from different files on the client side

拟墨画扇 提交于 2019-11-30 15:45:43

问题


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:


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.



来源:https://stackoverflow.com/questions/5633541/loading-the-wcf-configuration-from-different-files-on-the-client-side

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!