Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.NET WCF Ports 1

Status
Not open for further replies.

dBjason

Programmer
Mar 25, 2005
355
US
Hello,

I've been writing (several) self-hosted WCFs (hosted as a windows service).

Most of these are using TCP binding and function quite well.

My question concerns ports. In each app.config / web.config file, we're required to place a tag which usually looks something like this:

<baseAddress="net.tcp://ServerName:8080">

So, I ask, how does one determine an appropriate port to use? I know not to use any port numbers below 1025, but what about the others?

Should I also avoid any ports listed on this resource?

Or does it really matter? Could I just randomly assign port numbers if they're greater than 1025?

Any help or light on this subject would be greatly appreciated.

Thanks,
Jason
 

Basically you don't want to have 2 or more services/applications listening on the same port, as conflicts will occur. Many commercial programs listen on default ports (e.g., MS SQl Server listens on port 1433 by default). You should determine what ports are in use by both commercial and in-house applications and make sure your apps use different ports. Also, don't use any of the well-known ports for your in-house apps.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top