WCF Service EndPoint Address

Peter Annandale 21 Reputation points
2022-03-08T22:09:55.27+00:00

Hi,
Can anyone please expalin this to me, it just seems strange and i'm having issues with an application.

  1. My endpoint service conenction is: http://RRAPP01PROD:8101/DynamicsAx/Services/RRSalesOrderAIF
  2. The WCF Service generates correctly in Visual Studio to the above address and produces the Service Reference file
  3. If I open the Reference file and scroll to the bottom the GetEndPointAddress is returning an EndPointAddress of net.tcp://rrapp01prod:8201/DynamicsAx/Services/RRSalesOrderAIF
  4. If I open Postman and enter the endpoint address of http://RRAPP01PROD:8101/DynamicsAx/Services/RRSalesOrderAIF it connects and returns info abount the connection in XML format, if I browse the information I noted that soap12:address is "net.tcp://rrapp01prod:8201/DynamicsAx/Services/RRSalesOrderAIF"

My question is why is the address port numbers different?? (8101 vs 8201)

Regards
Peter

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,472 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lan Huang-MSFT 26,686 Reputation points Microsoft Vendor
    2022-03-09T03:04:02.657+00:00

    Hi @Peter Annandale ,
    Because WCF net.tcp and HTTP cannot use the same port.

    The TCP/IP protocol uses a 16-bit number, called a port, to differentiate connections to multiple network applications running on the same machine. If an application is listening on a port, then all TCP traffic for that port goes to that application. Other applications cannot listen on that port at the same time.

    Many protocols have a standard or default port number that they use. For example, the HTTP protocol typically uses TCP port 80.

    https://learn.microsoft.com/en-us/dotnet/framework/wcf/samples/net-tcp-port-sharing-sample
    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful