任何想法如何纠正这种味精..通过JS调用服务AddressFilter不匹配的EndpointDispatcher - 与要
与Message“HTTP://MySite.svc/GetStateXML”无法处理在接收端,由于EndpointDispatcher中的AddressFilter不匹配。检查发送者和接收者的同意EndpointAddresses
感谢
任何想法如何纠正这种味精..通过JS调用服务AddressFilter不匹配的EndpointDispatcher - 与要
与Message“HTTP://MySite.svc/GetStateXML”无法处理在接收端,由于EndpointDispatcher中的AddressFilter不匹配。检查发送者和接收者的同意EndpointAddresses
感谢
看<webHttp />
<services>
<service name="SimpleService.SimpleService" behaviorConfiguration="serviceBehaviour">
<endpoint address="" binding="webHttpBinding" contract="SimpleService.ISimpleService" behaviorConfiguration="web">
</endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange">
</endpoint>
</service>
</services>
....
....
<endpointBehaviors>
<behavior name="web">
<webHttp />
</behavior>
</endpointBehaviors>
为什么这被标记为答案?它没有帮助。 – 2017-08-02 14:53:39
它含糊不清,但通过使用这种格式(特别是两个端点)可以解决问题。确保名称都符合您定义的服务。我更改了服务名称,删除了服务行为配置,并更改了第一个端点合同。 – 2018-01-10 21:59:43
我只是碰到了这个问题,以及经历的学习WCF本书布斯塔曼特一个例子,而。 我曾使用WCF配置编辑器填写我的主机上的配置,并已将名称属性中的值设置为我的端点,而不是地址属性。一旦我解决了它的工作。 我发现另一篇文章中使用建议:
[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]
的实现类,它的工作,但不是根本原因。
底线似乎是:确保您的客户端和服务器配置匹配。
对于VB.NET的代码是:
下面列出的错误表示Web服务实现WS-Addressing。
“同为‘’不能在接收器进行处理,由于在EndpointDispatcher的AddressFilter不匹配的信息,检查发送者和接收者的EndpointAddresses同意”
包括在你的SOAP头访问以下Web服务:
<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://example.com/service</wsa:To>
</soap:Header>
这个答案拯救了我的一天!此外,这个答案是非常有用的:http://stackoverflow.com/a/15056211/1795351 – 2016-07-09 19:17:40
我在IIS的托管Web服务的开发环境中遇到了此问题。通过转到“IIS管理器”解决它,并添加绑定到错误消息中抱怨的主机名。
我在使用webHttpBinding
时出现此错误。
我通过<behaviors>
下加入
<endpointBehaviors>
<behavior name="EndPointBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
,并在我的endpoint
与binding="webHttpBinding"
设置behaviorConfiguration="EndPointBehavior"
解决它。
全部配置:
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="EndPointBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service name="WcfService1.Service1" behaviorConfiguration="ServiceBehavior">
<endpoint address=""
binding="webHttpBinding"
contract="WcfService1.IService1"
behaviorConfiguration="EndPointBehavior">
</endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange">
</endpoint>
</service>
</services>
我知道这听起来很愚蠢,但对于有此错误的其他人来说,请检查您的地址。我们得到这个错误,因为我们有一个双斜杠,应该只有一个。
http://localhost//servicename.svc
上述地址所引起的问题。
http://localhost/servicename.svc
没有表现出这个问题。
我们动态地创建了从窗体和数据库中读取的部分数据的完整地址。用户在进入代替servicename.svc /servicename.svc
感谢您分享您的解决方案。我有一个类似的错误。我的应用程序正在引用一个引用Web Service的库。我为Web服务使用了一个Camel Case名称,但是该Web服务在IIS中使用下划线而不是骆驼名称来部署。将库中的名称更改为下划线版本解决了这个问题。这就是为什么符合资源命名的重要性。 – 2016-12-12 13:38:28
我知道这听起来很愚蠢,但我也有同样的问题! :) – Nisarg 2017-06-02 14:15:19
添加webHttp
属性,你的配置:
endpointBehaviors
behavior name ="yourServiceContract"
webHttp automaticFormatSelectionEnabled ="true "
behavior
我有同样的问题,那只是为了完成:
,我需要使用配置(剩余部分)为:
没有为服务行为一个配置和端点行为
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="myServiceBehaviour">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="webEndpointBehaviour">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service name="My.Service" behaviorConfiguration="myServiceBehaviour">
<endpoint address="" binding="webHttpBinding" contract="My.IService" behaviorConfiguration="webEndpointBehaviour">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
你能告诉我们服务配置文件吗? – 2012-02-15 13:18:43