【问题标题】:SOAP requests fail with MEX BindingSOAP 请求因 MEX 绑定而失败
【发布时间】:2014-05-08 11:10:44
【问题描述】:

我对某些服务有一个奇怪的问题。我不是开发人员,我是系统管理员。

我们有一些 SOAP 服务在开发环境中运行。一些 SOAP 服务开始失败。这是一个例子。这些都来自相同的网络配置。

        <endpoint address="http://<URL>/<folder>/service.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="wsHttpBinding"
                  contract="eConsentSvc.IeConsent"
                  name="WSHttpBinding_IeConsent" />

这个没有:

        <endpoint address="http://<URL>/<folder>/service.svc/mex"
                  binding="wsHttpBinding"
                  bindingConfiguration="wsHttpBindingText"
                  contract="MetaDataSvc.IMetaData"
                  name="WSHttpBinding_IMetaData">
        </endpoint>

第二个引发 404 错误。产生的错误是这样的:

在 http:////service.svc/mex 上没有可以接受消息的端点侦听。

明显的区别是“/mex”。开发人员坚持认为它必须在那里,所以它必须在那里。为什么它会在 MEX 那里抛出 404 错误?

如果我删除 /mex,则服务会运行并生成它应该创建的 XML 文档。

请帮忙。我完全被难住了。

【问题讨论】:

    标签: c# soap iis-6 wcf-binding windows-server-2003


    【解决方案1】:

    在这个端点不能指定binding="wsHttpBinding" 它必须是 mex* 绑定之一,例如:mexHttpBinding
    另一种方法是简单地添加另一个端点&lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt;

    <endpoint address="http://<URL>/<folder>/service.svc/mex"
                  binding="wsHttpBinding"
                  bindingConfiguration="wsHttpBindingText"
                  contract="MetaDataSvc.IMetaData"
                  name="WSHttpBinding_IMetaData">
    </endpoint>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-15
      • 1970-01-01
      • 2021-09-01
      • 2015-01-06
      相关资源
      最近更新 更多