【问题标题】:WCF wsHttpBinding "There was no channel that could accept the message with action"WCF wsHttpBinding“没有可以接受带有操作的消息的通道”
【发布时间】:2011-02-08 11:07:26
【问题描述】:

[更新] 通过生成新的 web.config 解决了问题。可能的错误是第二个端点(“mex”)。 [更新/]

我在 IIS 中有一个网络服务。

我正在尝试调用一个函数,但收到如下错误消息:

没有频道可以接受带有“http://Datenlotsen.Cyquest/ICyquestService/ValidateSelfAssessment”操作的消息

我将它托管在标准网站的 IIS 中。在那里我创建了一个名为“CyQuestwebservice”的虚拟目录。对于客户端配置,我使用的是 Soap UI。该工具从 wsdl 生成客户端配置。

我的 webconfig 看起来像这样,你能帮帮我吗?:

<system.serviceModel>
    <extensions>
      <behaviorExtensions>
        <add name="wsdlExtensions" type="WCFExtras.Wsdl.WsdlExtensionsConfig, WCFExtras, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
      </behaviorExtensions>
    </extensions>
    <services>
      <service behaviorConfiguration="CyquestWebService.Service1Behavior"
        name="CyquestWebService.CyquestService">
        <endpoint address="" behaviorConfiguration="EndPointBehavior"
          binding="wsHttpBinding" bindingNamespace="http://Datenlotsen.Cyquest"
          contract="CyquestWebService.ICyquestService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" bindingNamespace="http://Datenlotsen.Cyquest"
          contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="EndPointBehavior" >
          <wsdlExtensions location="http://wssdev04.datenlotsen.intern/Cyquestwebservice/CyquestService.svc" singleFile="True"/>
        </behavior>
      </endpointBehaviors>  
      <serviceBehaviors>
        <behavior name="CyquestWebService.Service1Behavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
    <system.diagnostics>
      <sources>
        <source name="System.ServiceModel"
                switchValue="Information, ActivityTracing"
                propagateActivity="true">
          <listeners>
            <add name="traceListener"
                type="System.Diagnostics.XmlWriterTraceListener"
                initializeData= "c:\log\Traces.svclog" />
          </listeners>
        </source>
      </sources>
    </system.diagnostics>
</configuration>

【问题讨论】:

  • 您如何托管此服务?在 IIS 中?在哪个虚拟目录下,在什么地址?您如何连接到此服务?也向我们展示客户端配置!

标签: wcf iis channel wshttpbinding


【解决方案1】:

尝试在“请求属性”中将“跳过 SOAP 操作”设置为 true。

我在使用 SoapUI 测试 wsHttpBinding 时遇到了类似的问题。

【讨论】:

    【解决方案2】:

    通过生成新的 web.config 解决了问题。可能的错误是第二个端点(“mex”)。

    【讨论】:

      猜你喜欢
      • 2019-05-29
      • 1970-01-01
      • 2010-12-01
      • 1970-01-01
      • 2012-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-24
      相关资源
      最近更新 更多