无法启动具有 net.tcp 绑定错误 10049 的服务 [英] Can't launch service with net.tcp binding error 10049

查看:33
本文介绍了无法启动具有 net.tcp 绑定错误 10049 的服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 net.tcp 端点启动 WCF 服务时遇到问题.我收到了 10049 错误.

I have a problem with launching a WCF service using net.tcp endpoints. I'm getting an 10049 error.

我的app.config:

<system.serviceModel>
    <services>
        <service behaviorConfiguration="ServiceBehaviour0"
                 name="Tinkl.Server.Services.Authentication.AuthenticationService">
            <endpoint name="httpEndpoint"  
                address="reg"
                binding="basicHttpBinding"
                contract="Tinkl.Server.Services.Authentication.IRegistrationService" />
           <endpoint name="httpEndpoint" 
               address="auth"
               binding="basicHttpBinding"
               contract="Tinkl.Server.Services.Authentication.IAuthorizationService" />
           <!--
           <endpoint name="tcpEndpoint" 
               address="net.tcp://78.26.210.203:50050/reg"
               binding="netTcpBinding"
               contract="Tinkl.Server.Services.Authentication.IRegistrationService" />
           <endpoint name="tcpEndpoint"
               address="net.tcp://78.26.210.203:50051/auth"
               binding="netTcpBinding"
               contract="Tinkl.Server.Services.Authentication.IAuthorizationService" />
               -->
           <endpoint name="mexEndpoint"
               address="mex"
               binding="mexHttpBinding" bindingConfiguration=""
               contract="IMetadataExchange" />
           <host>
               <baseAddresses>
                   <add baseAddress="http://78.26.210.203:50076/" />
               </baseAddresses>
           </host>
        </service>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="ServiceBehaviour0">
                <!--<serviceMetadata />-->
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="True" />
            </behavior>
        </serviceBehaviors>
    </behaviors>

netTcpBinding 有 2 个端点,basicHttpBinding 有 2 个完全相同.

There are 2 endpoints with netTcpBinding and 2 same exact with basicHttpBinding.

当我尝试使用 netTcpBinding 端点时出现问题,我收到一个错误,但使用 basicHttpBinding 它工作正常...

The problem appears when I'm trying to use netTcpBinding endpoints, I'm getting an error, but with basicHttpBinding it works fine...

我在控制台应用程序中托管 WCF 服务.

I'm hosting the WCF service in a console application.

程序代码

ServiceHost authenticationHost = new ServiceHost(typeof(AuthenticationService));
authenticationHost.Open();

Console.WriteLine("close <ENTER>\n");

Console.ReadLine();
authenticationHost.Close();

也许有人遇到过类似的问题?

Maybe someone faced a similar problem?

如果需要,我会提供所有必要的附加信息

If needed, I will give all the necessary additional information

先谢谢你!

推荐答案

尝试替换行

net.tcp://78.26.210.203:50050/reg

net.tcp://localhost:50050/reg

对于 /auth 端点也是如此.

And the same for /auth endpoint.

这篇关于无法启动具有 net.tcp 绑定错误 10049 的服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆