簡體   English   中英

無法分派該消息,因為端點地址net.tcp:// localhost /上的服務不適用於該地址的協議

[英]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(如果存在)。

您可以逐步嘗試幾件事

  1. 確保所有必需的服務都在運行。 轉到本地服務並檢查以下服務。 查看圖像 1
  2. 正如您說的那樣,您已經在IIS中啟用了net.tcp綁定,所以它很好。 3.確保您的HTTP端口和NET.TCP端口不同,最好是80上的http和808上的NET.TCP。
  3. 重新啟動IIS並更新客戶端應用程序中的服務引用。
  4. 檢查是否為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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM