locked
Unable to access WCF service using NET.TCP binding RRS feed

  • Question

  • User-306210689 posted

    I am getting following error while accessing a WCF service that uses NET.TCP binding: The URI prefix is not recognized. Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/Service1.svc'. Could not connect to net.tcp://localhost/Service1.svc. The connection attempt lasted for a time span of 00:00:02.0051147. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:808. No connection could be made because the target machine actively refused it 127.0.0.1:808 If the service is defined in the current solution, try building the solution and adding the service reference again.

    My WCF configuration is:

    <system.serviceModel>
        <services>
          <service name="CoreService.Service1" behaviorConfiguration="beh1">
            <host>
              <baseAddresses>
                <add baseAddress="net.tcp://localhost/Service1.svc/mex" />
              </baseAddresses>
            </host>
            <endpoint
         binding="netTcpBinding"
         bindingConfiguration="ultra"
         contract="CoreService.IAccountService"/>
            <endpoint
          binding="netTcpBinding"
          bindingConfiguration="ultra"
          contract="CoreService.IBoardService"/>
            <endpoint
          binding="netTcpBinding"
          bindingConfiguration="ultra"
          contract="CoreService.ICategoryService"/>
    
            <endpoint
                    address="mex"
                    binding="mexTcpBinding"
                    contract="IMetadataExchange"/>
          </service>
        </services>
        <bindings>
          <netTcpBinding>
            <binding name="ultra"
                 maxBufferPoolSize="2147483647"
                 maxBufferSize="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="false" />
              <serviceDebug includeExceptionDetailInFaults="True" />
              <dataContractSerializer maxItemsInObjectGraph="65536" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
      </system.serviceModel>

    Please help!

    I also asked this question here: http://stackoverflow.com/questions/22562596/unable-to-access-wcf-service-using-net-tcp-binding

    Friday, March 21, 2014 11:45 AM

Answers

All replies