问题描述
我们的应用程序托管在 IIS 7.0 中.它通过 net.tcp 协议公开端点.但是我们一直遇到以下异常:
Our application is hosted in IIS 7.0. It exposes endpoints over net.tcp protocol. But we kept running into the following exception:
EndpointNotFoundException:无法发送消息,因为端点地址处的服务'net.tcp://localhost/xxx/service.svc' 对协议不可用地址.
我们已经检查了以下可能的原因.
We have checked the following places for possible causes.
- Windows 进程激活服务运行正常
- Net.Tcp Listener Adapter 服务正常.
- Net.Tcp 端口共享服务正常.
- 我们为 Web 应用程序绑定了 net.tcp.
- 网络应用程序启用了 net.tcp 协议,如下所示.
在检查了上述所有位置后,我尝试重置 IIS.还是不行.
I have tried to reset the IIS after checking all the above places. Still not working.
这让我很伤心.希望有人能给我一些提示.
This is killing me. Hope someone could give me some hints.
我搜索了很多.似乎这是一个非常普遍的问题,尚未完美解决.我认为是时候结束这种痛苦的屁股了.
I have searched a lot. Seems this is a very common issue which hasn't be perfectly solved. I think it's time to end this pain in ass.
非常感谢!
推荐答案
这很难说,但是您尝试连接的端口是什么?
It is hard to say but on what port are you trying to connect?
确保端口可用且没有其他人在使用它.
Make sure that port is available and nothing else is using it.
如果您使用代理,则还应添加以下内容:
If you are using a proxy you should add the below as well:
......
<httpTransport
maxBufferPoolSize="4194304"
maxBufferSize="1048576"
maxReceivedMessageSize="1048576"
proxyAddress="http://127.0.0.1.:8888
useDefaultWebProxy="false"
/>
</binding>
</customBinding>
这篇关于net.tcp 服务对于地址的协议不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!