net.tcp service is unavailable for the protocol of the address

别等时光非礼了梦想. 提交于 2021-02-17 21:36:13

问题


Our application is hosted in IIS 7.0. It exposes endpoints over net.tcp protocol. But we kept running into the following exception:

EndpointNotFoundException: The message could not be dispatched because the service at the endpoint address 'net.tcp://localhost/xxx/service.svc' is unavailable for the protocol of the address.

We have checked the following places for possible causes.

  • Windows Process Activation Service is running OK
  • Net.Tcp Listener Adapter service is OK.
  • Net.Tcp Port Sharing service is OK.
  • We made net.tcp binding for the web application.
  • The net.tcp protocol is enabled for the web application as below. net.tcp protocol is enabled

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.

Many thanks!


回答1:


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>


来源:https://stackoverflow.com/questions/7254796/net-tcp-service-is-unavailable-for-the-protocol-of-the-address

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!