gpt4 book ai didi

c# - WCF 试图公开一个 nettcp 端点; TCP 错误代码 10061 : No connection could be made because the target machine actively refused it

转载 作者:行者123 更新时间:2023-11-30 16:31:15 25 4
gpt4 key购买 nike

我不明白这里的问题是什么。我的 wsHttpBinding 工作正常。这是我的配置。非常感谢任何帮助。

<?xml version="1.0"?>
<configuration>
.....
<system.serviceModel>
<services>
<service behaviorConfiguration="DataService.Service1Behavior"
name="ODHdotNET.DataService">
<endpoint
address=""
binding="wsHttpBinding"
bindingConfiguration="largeTransferwsHttpBinding"
contract="ODHdotNET.IDataService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint
address="net.tcp://139.149.141.221:8001/DataService.svc"
binding="netTcpBinding"
contract="ODHdotNET.IDataService"/>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://139.149.141.221:8000/DataService.svc" />
</baseAddresses>
</host>
</service>
</services>
<bindings>
<wsHttpBinding>
<binding name="largeTransferwsHttpBinding2"
maxReceivedMessageSize="5000000" maxBufferPoolSize="5000000">
<security mode ="Message">
<message clientCredentialType="UserName"/>
</security>
</binding>
<binding name="largeTransferwsHttpBinding"
maxReceivedMessageSize="5000000" maxBufferPoolSize="5000000" />
</wsHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="DataService.Service1Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>

编辑:我在 Windows 服务中自托管;我没有使用 IIS。

最佳答案

您是说 WCF 客户端会抛出此错误吗?如果是这样:请在命令提示符下运行以下命令:网络统计-ona |找到“8001”如果返回数据,请发布

关于c# - WCF 试图公开一个 nettcp 端点; TCP 错误代码 10061 : No connection could be made because the target machine actively refused it,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5016857/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com