473,503 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do ports in WCF app.config file relate to windows services fil


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
Jun 27 '08 #1
1 4077
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
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4871
by: Scanner2001 | last post by:
I have a service with settings in the app.config file. I would like to be able to change these settings without restarting the service. Something similar to a web.config with web services. Whenever...
2
2515
by: Hemant Shah | last post by:
Folks, How many tcp ports does DB2 server use? I installed UDB 8.2 on a AIX system and created several instances. I used consecutive ports for each instance, but when I look at /etc/services...
2
2638
by: Anna | last post by:
I added a small Web.Config file to the root of my website so that I could view errors on a machine other than the server: <configuration> <system.web> <customErrors mode="Off" /> </system.web>...
1
3957
by: harinathch | last post by:
Hi, Iam working with myapplication.exe.config file in my vb.net windows application.Its working fine in my development environment. When i test this application in some other machine using exe and...
1
1795
by: herbert | last post by:
In VS.2005 a Windows Service can have an app.config file. A class library can also have an app.config file. Now if my Windows Services uses three class libraries, each of it coming with its own...
3
3368
by: tshad | last post by:
I have been trying to run IIS and Apache Tomcat on the same Server using the same Port (80 for http and 443 for https). I am trying to do this by using multiple IP address on the same Nic card. ...
7
6367
by: Wayne Pedersen | last post by:
Folks, I'm hosting through 1and1.com. I don't have a lot of experience deploying asp.net apps on shared webservers. I keep getting the following error message when trying to have my ASP.Net...
10
3230
by: sandipm | last post by:
Hi, In my application, I have some configurable information which is used by different processes. currently I have stored configration in a conf.py file as name=value pairs, and I am importing...
2
7387
by: =?Utf-8?B?YW5vbg==?= | last post by:
I am not sure if this is the right forum. Environment : Windows server 2008, IIS 7.0 I get the 'Could not load the file or assembly 'blowery.web.httpCompress' or one of its dependencies. The...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.