无法调度消息,因为端点地址 net.tcp://localhost/ 上的服务不可用于该地址的协议

本文关键字:地址 localhost 服务 协议 用于 消息 调度 因为 tcp net 端点 | 更新日期: 2023-09-27 18:32:38

我正在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(如果存在)。

无法调度消息,因为端点地址 net.tcp://localhost/ 上的服务不可用于该地址的协议

您可以逐步尝试几件事

  1. 确保所有必需的服务都在运行。转到本地服务并检查以下服务。看图片!1
  2. 正如您所说,您已经在 IIS 中启用了 net.tcp 绑定,因此它很好。3.确保您的HTTP端口和NET.TCP端口不同,最好是 http 在 80 和 NET 上。808 上的 TCP。
  3. 重新启动 IIS 并更新客户端应用程序中的服务引用。
  4. 检查是否为 NET 添加了任何新的服务引用。TCP比使用新的,删除已经创建的旧。

确保你做了第4点和第5点(如果你已经完成了第1点到第3点)如果您仍然遇到一些问题,请检查您的 IIS 是否已注册 ASP.NET 4.5 或您正在使用的任何其他版本。用于注册 IIS Asp.net 的命令aspnet_regiis -i 。 以管理员身份运行Visual Studio developper命令提示符,然后启动C:'Windows'Microsoft.NET'Framework64'v4.0.30319>aspnet_regiis -i