Click here to Skip to main content
15,311,561 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a WCF Service that self hosted in a console application with below app.config:
<?xml version="1.0" encoding="utf-8" ?>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
                <behavior name="serviceBehavior">
                    <serviceMetadata httpGetEnabled="false"/>
            <service name="TestService.Service" behaviorConfiguration="serviceBehavior">
                <clear />
                <endpoint address="net.tcp://" binding="netTcpBinding"
                <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
                    contract="IMetadataExchange" />
                        <add baseAddress="net.tcp://" />

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://'.
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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

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