0

Is there any way to determine which Local Port was used by the Client (C#) to Establish a connection to a SignalR Hub? I have looked at properties of both the HubCallerContext and HubConnection, but it does not seem to be available.

AntonE
  • 1
  • 3

1 Answers1

0

The short answer the question: yes, using netstat or similar you can look at all the connections your client initiated to the SignalR. There you can identify the TCP source port number.

If for some reason you want to get this from inside the application you can either try to find your way via Get underlying tcp connection from HttpWebRequest/Response or by following this answer.

Community
  • 1
  • 1
Ronald Rink 'd-fens'
  • 1,289
  • 1
  • 10
  • 27