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