Configure netTcpBinding

63 views Asked by At

There is a Cloud Service project. It uses netTcpBinding. Error at startup: Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]. Although the def file specifies this endpoint:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="TestCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2015-04.2.6">
  <WebRole name="TestService" vmsize="Standard_D1_v2">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
        </Bindings>
      </Site>
    </Sites>
    <ConfigurationSettings>
      <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" />
    </ConfigurationSettings>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
      <InputEndpoint name="Endpoint2" protocol="tcp" port="63492" />
    </Endpoints>
  </WebRole>
</ServiceDefinition>

How do I configure Cloudservice for netTcpBinding correctly?

1

There are 1 answers

1
Theobald Du On

You need to open the net.tcp port on the cloud service server.

Open IIS on your cloud service. Click the bindings to enter the add binding interface. enter image description here

Select the net.tcp type.

enter image description here

Finally, specify the port number for it.

enter image description here