WCF error: ChannelDispatcher with contract cannot open its Ichannellistener

Source: Internet
Author: User

Tag: Cannot open its ichannellisten

When you start the WCF service, an error occurs:

ChannelDispatcher with the contract "Itestservice" in "net.tcp://localhost:8080/tcptest" cannot open its ichannellistener.

When viewing the detailed exception information: found in the innerexception exception information, found:


{"Service certificate not provided."} Please specify the service certificate in ServiceCredentials. "}


Workaround:


Will:


<system.serviceModel>    <bindings>      <netTcpBinding>        <binding name= "Testbind" Maxreceivedmessagesize= "65536000" >          <readerquotas maxdepth= "+" maxstringcontentlength= "819200" Maxarraylength= "16384" maxbytesperread= "8192" maxnametablecharcount= "16384"/>          <reliablesession inactivitytimeout= "00:05:00"/>          <security mode= "Message" >

<security mode= "Message" > Changed to:


<security mode= "Transport" >


Reason:

ifwill beModeinsteadmessageway, this way is to encrypt or sign the message, so the certificate must be destined.



You can also specify a certificate location:


<behaviors>    <serviceBehaviors>      <behavior name= "CustomValidator" >        < servicecredentials>          <servicecertificate             findvalue= "8e F9 c6 6f 4e a0 0c (4f)" FB de C6 A7 E1 "5b 6e "            x509findtype=" Findbythumbprint "             storelocation=" CurrentUser "             storename=" My "/>        </ servicecredentials>      </behavior>    </serviceBehaviors>    </behaviors>


Reference Links:

WCF Security of Windows and Certificate

WCF error: ChannelDispatcher with contract cannot open its Ichannellistener

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.