You must Sign In to post a response.
  • Category: WCF

    Assigning Port Numbers in WCF


    I am a learner in WCF. I need to know which port numbers should we assign to multiple end points in windows 7 or shall we assign any port number randomly?


    <add baseAddress="http://localhost:8080/"/>
    <add baseAddress="net.tcp://localhost:8081/"/>

    How to see which ports are free and which ports are busy in windows 7.


  • #764185
    Hai Rajan,
    We can assign any port number greater than 1000 as below to it, most of the port numbers are assigned to some processes which might get conflicts with this.
    Below is the link for port numbers which are already assigned:

    Also you need to make sure that the site will be available by using this port number i.e. when you host the wcf service it should work on this port number. So you need to do settings in the IIS for the port number for your WCF service.
    Hope it will be helpful to you.

    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)

  • #766726

    Use the following code,
    <service name="MyNamespace.myServiceType">
    address="net.tcp://" binding="basicHttpBinding"
    contract="MyContract" />

  • Sign In to post your comments