These two days in groping for a shared port in WCF, refer to the following blog
WCF: How to host the Net.TCP protocol to IIS[WCF practice]1.WCF use Net.TCP to host to IIS
The content mentioned in these two blogs solves most of the problems in real-world development. Here according to your own practice, but also to summarize the written here:
In accordance with the two blog posts above, if you still encounter the following error message:
An attempt to create an unreachable is not supported. NET Framework services, you may encounter HTTP endpoints. Requires record type "Preambleack" to find "72"
You can view whether the host property in the service node in the configuration file is configured in system.servicemodel->services->service->host-> Base URL of the underlying binding is added under the Baseaddresses node
< baseaddresses > < baseaddress= "net.tcp://localhost:8004/"/></ Baseaddresses>
Note the port in the code snippet above: 8004, where the port number is consistent with the NET.TCP protocol port number that is enabled in IIS
Once the above two steps are complete, the current binding should be ready for use
Attention:
Does IIS have a cache or restart IIS does not completely release the already occupied port number problem, when the configuration file and interface in the port is changed, the original port number can also be used, restart IIS is still (select the server node in the IIS management interface, and then click the Restart link on the right)
The last question which Netizen knows, also hope in the comment area hint, greatly appreciate:
In the red circle of the binding information parameters have any rules or wording, 8004 after the asterisk (*) if replaced by another character, such as ABC, how will match the URL to access it?
Enable the NET.TCP transport Protocol in IIS