在WCF AddressFilter不匹配解决配置错误 [英] Resolving Configuration Error in WCF AddressFilter Mismatch
问题描述
我收到以下错误,可以使用一些帮助解决它。任何人有什么想法?
I am getting the following error and could use some help resolving it. Anyone have any ideas?
与To消息的http://本地主机:60078 / BidService.svc /查询不能在接收器进行处理,由于一个错配AddressFilter在EndpointDispatcher。检查发送者和接收者的EndpointAddresses同意。
The message with To 'http://localhost:60078/BidService.svc/Query' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.
客户端配置文件是:
<system.serviceModel>
<bindings>
<customBinding>
<binding name="WebHttpBinding_IBidService">
<textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
messageVersion="None" writeEncoding="utf-8">
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</textMessageEncoding>
<httpTransport manualAddressing="True" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint binding="customBinding" bindingConfiguration="WebHttpBinding_IBidService"
behaviorConfiguration="IBidServiceBehavior"
contract="myService.IBidService" name="WebHttpBinding_IBidService" />
</client>
<behaviors>
<endpointBehaviors>
<behavior name="IBidServiceBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
我的服务合同是:
My Service Contract is:
[ServiceContract(Namespace = "http://xxxx.com/services/bids")]
public interface IBidService
{
[OperationContract(Action = "*")]
[WebGet(RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped)]
List<BidSummary> Query();
}
我的服务的配置如下:
My Service is configured as follows:
<service name="xxx.Web.Services.Bids.BidService"
behaviorConfiguration="Cutter.Web.Services.Bids.BidServiceBehavior">
<endpoint address="" binding="basicHttpBinding"
contract="xxx.Web.Services.Bids.IBidService" />
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
<behavior name="Cutter.Web.Services.Bids.BidServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
有一件事,我读了你需要有,我已经添加了webHttp行为。任何帮助将是AP preciated。我只想要一个简单的POX服务
The one thing I read that you need to have the webHttp behavior which I've added. Any help would be appreciated. I just want a simple POX Service
推荐答案
我认为你需要的webHttp行为添加到服务配置为好。
I think you need to add the webHttp behavior to the service configuration as well.
这篇关于在WCF AddressFilter不匹配解决配置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!