now see tcp endpoint
<endpoint address="tcp"
binding="netTcpBinding"
bindingConfiguration="tcpBinding"
contract="ChatService.IChat"/>
tcp endpoint address has no url rather tcp the word has been assign to address property…why?
give me a sample url which can be a valid tcp url.
the address field of tcp endpoint will always have the fixed word called “tcp” is it rule or convention.
here is full binding sample
<service name="WCFService.Service" behaviorConfiguration="behaviorConfig">
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:1645/ChatServer/"/>
<add baseAddress="http://localhost:1648/ChatServer/"/>
</baseAddresses>
</host>
<endpoint address="tcp"
binding="netTcpBinding"
bindingConfiguration="tcpBinding"
contract="ChatService.IChat"/>
<endpoint address="net.tcp://localhost:1645/ChatServer/mex"
binding="mexTcpBinding"
contract="IMetadataExchange"/>
</service>
Without having the full configuration file, I cannot tell you the exact thing, but my guesses are:
I. address=”tcp”
a. There is a setting for the host base address, so the full address will be base address + tcp. For example the following service has the base address
b. Or the actual address of the endpoint will be set at the run time for the service contract.
II. A sample valid tcp uri
III. For the tcp binding the address must start with net.tcp, and it’s a rule.
For more information you can have a look at the following link