Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AddressFilter mismatch at the EndpointDispatcher - the msg with To

Tags:

wcf

Any ideas how I correct this.. calling a service via js

The message with To 'http://MySite.svc/GetStateXML' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree

thanks

like image 824
Jon Avatar asked Feb 15 '12 12:02

Jon


4 Answers

I just ran into this as well while going through an example in the Learning WCF book by Bustamante. I had used the WCF Config Editor to fill out my config on my host and had put the value in the name attribute for my endpoint rather than the address attribute. Once I fixed it things worked. I found another post that suggested using:

[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)] 

on the implementation class, which worked but wasn't the root cause.

Bottom line appears to be: make sure your client and server configs match.

like image 111
Sean B Avatar answered Nov 07 '22 21:11

Sean B


The error listed below indicates that the Web Service implements WS-Addressing.

"The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree"

Include the following in your SOAP Headers to access the Web Service:

<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://example.com/service</wsa:To>
</soap:Header>
like image 24
Kishore Guruswamy Avatar answered Nov 07 '22 20:11

Kishore Guruswamy


I got this error while I was using webHttpBinding.

I resolved it by adding

<endpointBehaviors>
  <behavior name="EndPointBehavior">
    <enableWebScript/>
  </behavior>
</endpointBehaviors>

under <behaviors> and setting behaviorConfiguration="EndPointBehavior" in my endpoint with binding="webHttpBinding".

Full config:

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

like image 23
SNag Avatar answered Nov 07 '22 21:11

SNag


I know it sounds silly but for anyone else that has this error check your address. We were getting this error because we had a double slash where there should have only been one.

http://localhost//servicename.svc

The above address caused the problem.

http://localhost/servicename.svc

Did not exhibit the problem.

We were dynamically creating the full address from parts of data read in from windows forms and a database. The user was entering /servicename.svc instead of servicename.svc

like image 30
Aaron Havens Avatar answered Nov 07 '22 19:11

Aaron Havens