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

    Assigning Port Numbers in WCF

    Hi,

    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?

    e.g
    ---

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

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

    Regards,

    RAJAN CRP
  • #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:

    http://www.networksorcery.com/enp/protocol/ip/ports00000.htm

    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.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #766726
    HI,

    Use the following code,
    <Code>
    <services>
    <service name="MyNamespace.myServiceType">
    <endpoint
    address="net.tcp://0.0.0.0:8000" binding="basicHttpBinding"
    bindingConfiguration="myBindingConfiguration1"
    contract="MyContract" />
    </service>
    </services>
    </code?


Sign In to post your comments