As the services file states:
This file contains port numbers for well-known services defined by IANA
This file doesn't publish port assignments to given applications - it merely
lists the port numbers used by well known communications protocols. This
isn't really somewhere for you to publish your app's custom port
assignments.
If you want to publish your app at a given [ip address]:[port], then you
should do so either in the app.config or hard-coded into your app.
--- BitCrazed ---
"Brad" <Br**@discussions.microsoft.comwrote in message
news:BB**********************************@microsof t.com...
>
Generally on a Windows system the services file (located in
Windows\System32\Drviers\Etc\Services) would specify port allocation to
different applications. It contains registered ports and dynamic/private
ports. This was used to reduce the chance of Port conflicts. This
allowed
applications to use a port name or alias instead of a number.
In WCF, a common paradigm is to allocate your port number in the
app.config
file of your application.
Is there any way to configure a WCF application to use a port number that
is
configured in the Services file? As this is where all our other ports are
configured for non WCF services.
Yes I realise that I could programmatically obtain the port number from
the
services file and over ride the one in the config file. That seems like a
"hack" to me though.
Regards,
Brad