加载不同的文件WCF配置在客户端 [英] Loading the WCF configuration from different files on the client side

查看:129
本文介绍了加载不同的文件WCF配置在客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WCF一个常见的​​问题,很多人面对的是来自加载不同的配置文件中的客户端配置是不可能的。

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.

我发现两个引用:

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 ??

任何一个最好的解决方案的建议?我使用VS 2008和.NET 3.5。

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

推荐答案

第一个链接(博客文章)是更符合你的情况。你唯一的选择是使用 WCF发现来发现你的端点配置在运行时,但这种做法肯定是更多的工作,并且可以在管理模式变得复杂。

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.

这篇关于加载不同的文件WCF配置在客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆