我正在 Visual Studio 2012 中开发 WCF 服务。以下是 web.config 文件:
<system.serviceModel>
<client>
<endpoint address="net.tcp://localhost/BlueYonder/Booking" binding="netTcpBinding" contract="BlueYonder.BookingService.Contracts.IBookingService" name="BookingTcp">
<identity>
<certificateReference storeLocation="LocalMachine" storeName="TrustedPeople" x509FindType="FindBySubjectName" findValue="Server"/>
</identity>
</endpoint>
</client>
<bindings>
<netTcpBinding>
<binding>
<security mode="Message">
<message clientCredentialType="Certificate"/>
</security>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior>
<clientCredentials>
<serviceCertificate>
<authentication revocationMode="NoCheck" />
</serviceCertificate>
<clientCertificate storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" findValue="Client"/>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
我还在 IIS 中启用了 net.tcp 绑定。此外,我还检查了所需的服务(侦听器)是否正在运行。
但是,我收到以下错误消息:
EndPointNotFoundException
在 net.tcp://localhost/BlueYonder/Booking 上没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的。有关更多详细信息,请参阅 InnerException(如果存在)。