在没有 mex 绑定的情况下引用 WCF 服务 [英] Referencing WCF Services without mex binding

查看:41
本文介绍了在没有 mex 绑定的情况下引用 WCF 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道 Visual Studio 中的客户端项目如何引用没有 mex 绑定的 WCF 服务.每当我删除任何示例 WCF 服务中的默认 mex 绑定时,客户端应用程序都找不到该服务,并且在自动生成的注释中,建议在生产环境中删除 mex 绑定.那么客户端应用程序应该如何找到服务并引用它?

I was wondering how a client project in Visual Studio could reference a WCF service that doesn't have a mex binding. Whenever I remove the default mex binding in any sample WCF service, the client apps cannot find the service and in the auto-generated comments, it's recommended that in production environment, mex binding should be removed. Then how are the client apps supposed to find the service and reference it?

推荐答案

mex 端点是 WCF SOAP 服务的必要部分.它使客户端工具包能够下拉 WSDL 并自动生成代理类.正如您所指出的,没有它,客户端将无法获取信息来使用服务.如果您希望客户能够使用并找到您的服务,您应该在您的服务投入生产时让它保持可用状态.

The mex endpoint is a necessary part of WCF SOAP services. It is what enables client toolkits to pull down the WSDL and auto-generate proxy classes. As you point out, without it, clients have no way to get the information to consume the service. If you want clients to be able to consume and find your service, you should leave it available when your service is in production.

这篇关于在没有 mex 绑定的情况下引用 WCF 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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