[英]The message could not be dispatched because the service at the endpoint address net.tcp://localhost/ is unavailable for the protocol of the address
I am developing a WCF service in Visual Studio 2012. The following is the web.config file: 我正在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>
I have also enabled net.tcp binding in IIS. 我还启用了IIS中的net.tcp绑定。 In addition, I have check the required service (listeners) are running.
另外,我已经检查了所需的服务(侦听器)是否正在运行。
However, I am getting the following error message: 但是,我收到以下错误消息:
EndPointNotFoundException EndPointNotFoundException
There was no endpoint listening at net.tcp://localhost/BlueYonder/Booking that could accept the message. 在net.tcp:// localhost / BlueYonder / Booking上没有侦听终结点的端点可以接受该消息。 This is often caused by an incorrect address or SOAP action.
这通常是由不正确的地址或SOAP操作引起的。 See InnerException, if present, for more details.
有关更多详细信息,请参见InnerException(如果存在)。
You can try couple of things step-by-step 您可以逐步尝试几件事
HTTP
port and NET.TCP
port are different preferably http on 80 and NET.TCP on 808. HTTP
端口和NET.TCP
端口不同,最好是80上的http和808上的NET.TCP。 Make sure you do point 4 and 5(if you have already done point 1 to 3) If you are still facing some problem check that your IIS is register for ASP.NET 4.5 or any other version which you are using. 确保执行第4点和第5点(如果已经完成第1点到第3点)。如果仍然遇到问题,请检查IIS是否已注册ASP.NET 4.5或您使用的任何其他版本。 Command for registering Asp.net for IIS is
aspnet_regiis -i
. 用于为IIS注册Asp.net的命令是
aspnet_regiis -i
。 run Visual studio developper command prompt as Administrator then launched C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319>aspnet_regiis -i
以管理员身份运行Visual Studio开发人员命令提示符,然后启动
C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319>aspnet_regiis -i
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.