简体   繁体   English

在EndpointDispatcher上ContractFilter不匹配?

[英]ContractFilter mismatch at the EndpointDispatcher?

Here i am calling the method from the hosted RESTful service in my browser 在这里,我从浏览器中托管的RESTful服务调用该方法

https://eshop/LinkService/LinkService.svc/GetStudentObj

and getting the following error 并得到以下错误

The message with Action '' 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)

Config file 配置文件

<system.serviceModel>
    <services>
      <service name="LinkService.LinkService" behaviorConfiguration="MyServiceBehavior">
        <endpoint address="" binding="webHttpBinding" bindingConfiguration="https" contract="LinkService.ILinkService" />
    <endpoint contract="IMetadataExchange" binding="mexHttpsBinding" address="mex" />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="https">
          <security mode="Transport">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </webHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="MyServiceBehavior">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true"/>
    <standardEndpoints>
      <webHttpEndpoint>
        <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true"/>
      </webHttpEndpoint>
    </standardEndpoints>
  </system.serviceModel>

and

   public Student GetStudent()
        {
            Student stdObj = new Student
            {
                StudentName = "Bala",
                Age = 29,
                Mark = 95
            };
            return stdObj;

        }

and

 [ServiceContract]
    public interface ILinkService
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "/GetStudentObj", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json,ResponseFormat = WebMessageFormat.Json)]
        Student GetStudent();
    }

Any suggestion? 有什么建议吗?

<endpoint address />标记中添加行为配置

  <endpoint address="" binding="webHttpBinding" bindingConfiguration="https" contract="LinkService.ILinkService" behaviorConfiguration="web"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 EndpointDispatcher上的ContractFilter不匹配 - ContractFilter mismatch at the EndpointDispatcher EndpointDispatcher上的ContractFilter不匹配(错误处理) - ContractFilter mismatch at the EndpointDispatcher (error handling) WCF- ContractFilter在EndpointDispatcher上不匹配 - WCF- ContractFilter mismatch at the EndpointDispatcher WCF ContractFilter 在 EndpointDispatcher 错误处不匹配 - WCF ContractFilter mismatch at the EndpointDispatcher error 由于EndpointDispatcher的ContractFilter不匹配,因此无法在接收方处理带有动作&#39;&#39;的消息。 - The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. 由于EndpointDispatcher的ContractFilter不匹配,带有Action的消息无法在接收方处理 - The message with Action cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher WCF ContractFilter不匹配 - WCF ContractFilter mismatch 服务客户端通信上的ContractFilter不匹配错误 - ContractFilter mismatch error on service client communication 启用可靠 Session 时 WCF 合同过滤器不匹配 - WCF ContractFilter Mismatch when enabling Reliable Session 错误由于EndpointDispatcher的AddressFilter不匹配,带有To&#39;&#39;的消息无法在接收方处理 - Error The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM