I have a WCF Service that self hosted in a console application with below app.config:
="1.0"="utf-8"
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceMetadata httpGetEnabled="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="TestService.Service" behaviorConfiguration="serviceBehavior">
<clear />
<endpoint address="net.tcp://127.0.0.1:7474/Service" binding="netTcpBinding"
contract="TestService.IService">
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://127.0.0.1:7474/Service" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
after I run this console program, i try to connect this service by adding service reference from a client application in another project. but it says:
The URI prefix is not recognized.
Metadata contains a reference that cannot be resolved: 'net.tcp://127.0.0.1:7474/Service'.
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:04:59.9359963'.
An existing connection was forcibly closed by the remote host
If the service is defined in the current solution, try building the solution and adding the service reference again.
can someone tell me what's the problem ?
I search in google a couple of days but nothing