使WCF更容易配置 [英] Making WCF easier to configure

查看:120
本文介绍了使WCF更容易配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组WCF Web服务通过桌面应用程序动态连接。

I have a set of WCF web services connected to dynamically by a desktop application.

我的问题是WCF需要工作的真正详细的配置设置。使SSL工作涉及自定义设置。获得MTOM或其他任何工作需要更多。你想压缩?这里我们再次...

My problem is the really detailed config settings that WCF requires to work. Getting SSL to work involves custom settings. Getting MTOM or anything else to work requires more. You want compression? Here we go again...

WCF真的很强大 - 你可以使用多种不同的方式来连接,但是似乎都涉及到大量的详细配置。如果主机和客户端不完全匹配,您很难破译错误。

WCF is really powerful - you can use a host of different ways to connect, but all seem to involve lots of detailed config. If host and client don't match perfectly you get hard to decipher errors.

我想让桌面应用程序更容易配置 - 理想的是某种自动发现。

I want to make the desktop app far easier to configure - ideally some kind of auto-discovery. The users of the desktop app should just be able to enter the URL and it do the rest.

有人知道这是一个很好的方法吗?

Does anyone know a good way to do this?

我知道Visual Studio可以为你设置配置,但我想桌面应用程序能够基于各种不同的服务器设置。

I know Visual Studio can set the config up for you, but I want the desktop app to be able to do it based on a wide variety of different server set-ups.

我知道VS的工具可以在外部使用,但我正在寻找的桌面应用程序的用户不一定是WCF专家。

I know that VS's tools can be used externally, but I'm looking for users of the desktop apps to not have to be WCF experts. I know MS made this intentionally over complicated.

有没有什么办法,机制,第三方库或任何东西来使WCF设置的自动发现成为可能?

Is there any way, mechanism, 3rd party library or anything to make auto-discovery of WCF settings possible?

推荐答案

有关端点的所有信息都可以在服务的元数据中获得,您可以编写客户端将会探索服务的元数据,配置客户端。对于代码示例,您可以查看这个优秀的 Mex Explorer 从Juval Lowy。

All information about the endpoint is available in metadata of a service, you can write a client what will explore the meta data of the service and will configure the client. For a code example you can look into this excellent Mex Explorer from Juval Lowy.

这篇关于使WCF更容易配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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