I am trying to add a client for the WCF service based on net.tcp. When I use "Add Service Link" and specify this URL: net.tcp: //localhost/service1.svc , it gives the following error.
The URI prefix is not recognized. Metadata contains a link; it cannot be resolved: 'net.tcp: //localhost/service1.svc'. Could not connect to net.tcp: //localhost/service1.svc. The connection attempt continued for a period of time 00: 00: 02.0051147. TCP error code 10061: No connection can be made because the target machine actively refused it 127.0.0.1:808. The connection could not be completed because the target machine actively refused it 127.0.0.1:808 If the service is defined in the current solution, try creating a solution and adding the link service again.
I checked the Windows components for non-WCF services, but they are already installed. This is the binding:

As you can see, they are installed for .NET 3.5.1, and my service is built into .NET 4.5. This is problem? And how do I solve it? Since there is no .NET 4.5 version in the list of Windows components.
The following is the configuration of my WCF service:
<system.serviceModel>
<services>
<service name="CoreService.Service1" behaviorConfiguration="beh1">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost/Service1.svc"/>
</baseAddresses>
</host>
<endpoint
binding="netTcpBinding"
bindingConfiguration="ultra"
contract="CoreService.IAccountService"/>
<endpoint
binding="netTcpBinding"
bindingConfiguration="ultra"
contract="CoreService.ICategoryService"/>
<endpoint
binding="netTcpBinding"
bindingConfiguration="ultra"
contract="CoreService.ICommonService"/>
<endpoint
binding="netTcpBinding"
bindingConfiguration="ultra"
contract="CoreService.IFollowerService"/>
<endpoint
binding="netTcpBinding"
bindingConfiguration="ultra"
contract="CoreService.IInterestService"/>
<endpoint
binding="netTcpBinding"
bindingConfiguration="ultra"
contract="CoreService.IInviteService"/>
<endpoint
address="mex"
binding="mexTcpBinding"
contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="ultra"
maxBufferPoolSize="2147483647"
maxBufferSize="2147483647"
maxConnections="2147483647"
maxReceivedMessageSize="2147483647"
portSharingEnabled="false"
transactionFlow="false"
listenBacklog="2147483647"
sendTimeout="00:01:00">
<security mode="None">
<message clientCredentialType="None"/>
<transport protectionLevel="None" clientCredentialType="None"/>
</security>
<reliableSession enabled="false"/>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="beh1">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="True" />
<dataContractSerializer maxItemsInObjectGraph="65536" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
source
share