WCF wsHttpBinding“没有可以通过操作接受消息的通道”

发布于 2024-08-29 04:56:03 字数 2634 浏览 3 评论 0原文

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

我在 IIS 中有一个 Web 服务。

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

没有可以通过操作 '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>

[Update] Solved the Problem by generating a new web.config. Possible error was the second endpoint ("mex"). [Update/]

I have a webservice in IIS.

I'm trying to call a function but i get an errormessage like:

There was no channel that could accept the message with action 'http://Datenlotsen.Cyquest/ICyquestService/ValidateSelfAssessment'

I'm hosting it in an IIS in the standard website. There I created a virtual directory named "CyQuestwebservice". For the client side config i'm using Soap UI. That Tool generates the client config from the wsdl.

my webconfig looks like this, can you help me?:

<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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤蝉 2024-09-05 04:56:03

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

Solved the Problem by generating a new web.config. Possible error was the second endpoint ("mex").

莫相离 2024-09-05 04:56:03

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

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

Try setting "Skip SOAP Action" to true in the "Request Properties".

I had a similar issue testing wsHttpBinding using SoapUI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文