WCF wsHttpBinding“没有可以通过操作接受消息的通道”
[更新] 通过生成新的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过生成新的 web.config 解决了问题。可能的错误是第二个端点(“mex”)。
Solved the Problem by generating a new web.config. Possible error was the second endpoint ("mex").
尝试在“请求属性”中将“跳过 SOAP 操作”设置为 true。
我在使用 SoapUI 测试 wsHttpBinding 时遇到了类似的问题。
Try setting "Skip SOAP Action" to true in the "Request Properties".
I had a similar issue testing wsHttpBinding using SoapUI.