I have a WCF service that uses NetTcpBinding and runs on a windows service. Remote clients connect to this service. So far, I have defined the endpoint for using "localhost".
If the host computer has several network adapters, will it receive messages on all adapters?
Would it be better to assign the hostname of the machine to the endpoint instead of "localhost"?
What are the advantages / disadvantages?
You can use System.Environment.MachineName
:
new EndpointAddress(new UriBuilder {Scheme = Uri.UriSchemeNetTcp, Port = port, Host = System.Environment.MachineName}.Uri);
, , localhost, URI :
net.tcp://0.0.0.0
, , .
Source: https://habr.com/ru/post/1721930/More articles:What is the difference between HttpContext.Current.Response and Page.Response? - cachingEnterprise-class databases that can handle large RDF datasets? - databaseHow to encrypt passwords for JConsole password file - javaPyfacebook from assembly - pythonHow to execute a query from a stored procedure in SQL Server? - sqlCheck if array is inside string - arraysGetting control in winform to disable them - c #Where do you "load balance" ORM in a PHP MVC application - phpDeep cloning in Compact Framework - c #LINQ (для сущностей) - Фильтрация элементов с использованием ints - linqAll Articles