简体   繁体   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

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 您可以逐步尝试几件事

  1. Make sure all required services are running. 确保所有必需的服务都在运行。 Go to local service and check for following services. 转到本地服务并检查以下服务。 SEE THE IMAGE ! 查看图像 1 1
  2. As you said that you have already enabled net.tcp binding in IIS so its Good. 正如您说的那样,您已经在IIS中启用了net.tcp绑定,所以它很好。 3.Make sure that your HTTP port and NET.TCP port are different preferably http on 80 and NET.TCP on 808. 3.确保您的HTTP端口和NET.TCP端口不同,最好是80上的http和808上的NET.TCP。
  3. Restart the IIS and Update the service reference in client application. 重新启动IIS并更新客户端应用程序中的服务引用。
  4. Check if any new service referance added for NET.TCP than use new one, Delete the old one which you have already created. 检查是否为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.

相关问题 找不到与端点的scheme net.tcp匹配的基址 - Could not find a base address that matches scheme net.tcp for the endpoint 在 net.tcp://url 上没有侦听端点可以接受消息。 这通常是由不正确的地址或 SOAP 操作引起的 - There was no endpoint listening at net.tcp://url that could accept the message. This is often caused by an incorrect address or SOAP action 找不到与绑定MetadataExchangeTcpBinding自托管端点的终结点计算机匹配方案net.tcp的基地址 - Could not find a base address that matches scheme net.tcp for the endpoint with binding MetadataExchangeTcpBinding self hosting 确定WCF net.tcp端点地址是否有效 - Determining if a WCF net.tcp endpoint address is valid 找不到与绑定 NetTcpBinding 的端点的方案 net.tcp 匹配的基地址。 基地址方案是 [http] - Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Base address schemes are [http] 找不到与方案 net.tcp 匹配的基地址 - Could not find a base address that matches scheme net.tcp 例外:找不到与方案net.tcp匹配的基址 - Exception: Could not find a base address that matches scheme net.tcp 使用net.tcp在WCF服务中指定基址的正确方法 - Right way to specify base address in WCF service with net.tcp 带有 net.tcp 的 WCF 错误“服务端点未能侦听 URI,因为访问被拒绝 - WCF error with net.tcp "The service endpoint failed to listen on the URI because access was denied 不支持协议&#39;net.tcp&#39; - The protocol 'net.tcp' is not supported
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM