473,651 Members | 3,011 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\System3 2\Drviers\Etc\S ervices) 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 programmaticall y 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 4098
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**@discussio ns.microsoft.co mwrote in message
news:BB******** *************** ***********@mic rosoft.com...
>
Generally on a Windows system the services file (located in
Windows\System3 2\Drviers\Etc\S ervices) 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 programmaticall y 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
4887
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 I change a setting, for example the folder that data is written to, the change does not seem to register. What I believe is that the app.config is read in at the startup of the exe (windows service), and then never read again. Is there a way to...
2
2532
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 file, it seems that db2icrt command adds 4 ports for each server. Example:
2
2646
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> </configuration> However, this immediately threw a different error when I tried to view
1
3976
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 all related dll's and files. Iam getting following error. Thx in advance. Hari.
1
1803
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 app.config file, in which sequence are the app config files read in? eg What happens if there are trace switches of the same name with different values in those files? Or a the config files local to a VS project/assembly ? If so, they should not...
3
3380
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. This would allow me multiple sockets for the same port. With all my research it seems that most services seem to listen on ALL IP addresses on the same machine for a particular port (25 SMTP, 53 DNS, 80 HTTP). I found you can tell IIS NOT to...
7
6384
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 (2.0) web service access the SQL 2000 database: System.Web.Services.Protocols.SoapException was unhandled Actor=""
10
3249
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 conf.py file to use this variable. it works well import conf print conf.SomeVariable but if I need to change some configuration parameteres, it would need
2
7391
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 system cannot fond the file specified error. When I comment out the line in the web config file, I get the error on the line following that. I have all the dll files in the bin folder.
0
8361
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8278
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8701
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5615
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
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 we have to send another system
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.