Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

I am getting the following exception in my WCF class library project.

The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service.

Please find below my WCF App Config file.

C#
<system.serviceModel>
  <bindings>
    <netTcpBinding>
      <binding name="tcpBinding" portSharingEnabled="True">
        <security mode="None">
          <transport clientCredentialType="None" protectionLevel="None" />
          <message clientCredentialType="None" />
        </security>
      </binding>
    </netTcpBinding>
  </bindings>
  <services>
    <service behaviorConfiguration="CatWcfServiceLibrary.Service1Behavior"
      name="CatWcfServiceLibrary.CATService">
      <endpoint address="" binding="netTcpBinding" bindingConfiguration="tcpBinding"
        name="epNetTcp" contract="CatWcfServiceLibrary.ICATService" />
      <endpoint address="" binding="basicHttpBinding" contract="CatWcfServiceLibrary.ICATService" />
      <endpoint address="http://localhost:8084/CatWcfService\mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      <host>
        <baseAddresses>
          <add baseAddress="http://localhost:8082/CatWcfService" />
          <add baseAddress="net.tcp://localhost:8081/CatWcfService" />
        </baseAddresses>
      </host>
    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior name="CatWcfServiceLibrary.Service1Behavior">
        <!-- To avoid disclosing metadata information,
        set the value below to false and remove the metadata endpoint above before deployment -->
        <serviceMetadata httpGetEnabled="True"/>
        <!-- To receive exception details in faults for debugging purposes,
        set the value below to true.  Set to false before deployment
        to avoid disclosing exception information -->
        <serviceDebug includeExceptionDetailInFaults="true" />
      </behavior>
    </serviceBehaviors>
  </behaviors>
</system.serviceModel>


Things I have tried.

1. All my Net.Tcp Port Sharing Service, Net.Tcp Listener Adapter are up and running in windows services.
2. Port Sahring enabled in config file.

Please Help

Thanks in advance.

"Happy Coding"
Posted
Comments
Baskaranp 31-Aug-21 3:12am    
Hi, Hope you are doing good,
Did you find solution for the above issue?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900