The message with Action 'http://tempuri.org/IService2/getName' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

解决方案 »

  1.   

    Check that sender and receiver have the same contract and the same binding 
      

  2.   

    从这几句错误信息,大概是说你使用的WebService或WCF的发送端和接受端的契约不匹配
      

  3.   

    原因
    This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver
      

  4.   

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
     <system.serviceModel>
      <services>
       <service name=" CalculatorService" >
        <endpoint 
        <-- Leave the address blank to be populated by default-->
        <--from the hosting environment,in this case IIS, so -->
        <-- the address will just be that of the IIS Virtual -->
        <--Directory.-->
          address="" 
        <--Specify the binding type -->
          binding="wsHttpBinding"
        <--Specify the binding configuration name for that -->
        <--binding type. This is optional but useful if you -->
        <--want to modify the properties of the binding. -->
        <--The bindingConfiguration name Binding1 is defined -->
        <--below in the bindings element. -->
          bindingConfiguration="Binding1"
          contract="ICalculator" />
       </service>
      </services>
      <bindings>
       <wsHttpBinding>
        <binding name="Binding1">
         <-- Binding property values can be modified here. -->
         <--See the next procedure. -->
        </binding>
       </wsHttpBinding>
      </bindings>
     </system.serviceModel>
    </configuration>
      

  5.   

    这个我没用使用配置文件,是吧配置信息储存在了sqlite里了 然后启动时候动态创建的服务.我用的是WSHttpBinding 我测试的时候把安全设置成了 None了啊。