相关疑难解决方法(0)

解决WCF AddressFilter不匹配中的配置错误

我收到以下错误,可以使用一些帮助解决它.有人有主意吗?

由于EndpointDispatcher上的AddressFilter不匹配,因此无法在接收方处理带有" http:// localhost:60078/BidService.svc/Query " 的消息.检查发送方和接收方的EndpointAddresses是否一致.

客户端配置文件是:

<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>
Run Code Online (Sandbox Code Playgroud)

我的服务合同是:

[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();
}
Run Code Online (Sandbox Code Playgroud)

我的服务配置如下:

<service name="xxx.Web.Services.Bids.BidService" 
          behaviorConfiguration="Cutter.Web.Services.Bids.BidServiceBehavior">
   <endpoint address="" binding="basicHttpBinding" 
             contract="xxx.Web.Services.Bids.IBidService" …
Run Code Online (Sandbox Code Playgroud)

.net xml wcf

18
推荐指数
1
解决办法
6万
查看次数

标签 统计

.net ×1

wcf ×1

xml ×1