为什么我需要 mex 端点和 httpGetEnable? [英] Why do i need both mex endpoint and httpGetEnable?

查看:20
本文介绍了为什么我需要 mex 端点和 httpGetEnable?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道为什么我需要声明这个:

I was wondering why do i need to declare this:

 <serviceMetadata httpGetEnabled="true" />

还有这个

<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />

如果我只使用第一个 - 它正在通过浏览器工作.那为什么我需要第二个?

If i use only the first one - it is working via browser. so why do i need the second one ?

你能举例说明我必须使用后者的情况吗?

Can you give me example please for the situation which i'll have to use the latter ?

推荐答案

您需要

  • 启用服务以发布元数据(这是 serviceMetadata 行为) - 但您不需要 httpGetEnabled- 这是可选的

  • enable the service to publish metadata at all (that's the serviceMetadata behavior) - but you don't need the httpGetEnabled - that's optional

有一个地方(端点),查询客户端可以在其中获取服务元数据 - 这就是 MEX 端点.这是用于元数据的机器可读格式 - Visual Studio 或 svcutil 可用于创建客户端的格式.它不适合人类食用

have a place (endpoint) where an inquiring client can go grab that service metadata - that's the MEX endpoint. This is for a machine-readable format of the metadata - one that Visual Studio or svcutil can use to create a client. It's not intended for human consumption

这篇关于为什么我需要 mex 端点和 httpGetEnable?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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