[英]Could not find a base address that matches scheme net.tcp for the endpoint
[英]The message could not be dispatched because the service at the endpoint address net.tcp://localhost/ is unavailable for the protocol of the address
我正在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(如果存在)。
您可以逐步嘗試幾件事
HTTP
端口和NET.TCP
端口不同,最好是80上的http和808上的NET.TCP。 確保執行第4點和第5點(如果已經完成第1點到第3點)。如果仍然遇到問題,請檢查IIS是否已注冊ASP.NET 4.5或您使用的任何其他版本。 用於為IIS注冊Asp.net的命令是aspnet_regiis -i
。 以管理員身份運行Visual Studio開發人員命令提示符,然后啟動C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319>aspnet_regiis -i
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.