c# - Weird port being reported in WCF for remote client -
I have an IIS hosted WCF service that is configured with WebHeading. This is the same default WCF service VS2008, when you create a new one. I have only made one change to allow it to call javascript.
The GetData (int value) in the test method, I return a string that shows the IP address, port, and user agent to the remote client. Everything works fine, except that I am not expecting the port number which it is returning. I expect port 80 but instead 49353 gets something like this. Below is the method I'm calling.
public string GetData (int value) {OperationContext context = OperationContext.Current; Message Peripherties Message Properties = Reference Incomparable JeepParties; RemoteEndpointMessageProperty as the endpointProperty = messageProperties [RemoteEndpointMessageProperty.Name]; Return string.format ("hello {0}! \ R \ naddress: {1} \ r \ nport: {2} \ r \ nUser: {3}", value, endpoint property.address, endpointproperty.port, Web Operation Contact .informationRequest.UserAgent); } Like I said, I am implementing this method with javascript. IIS is configured for port 80, so I'm not sure why the report is incorrect to the port.
I think you might have a little backwards on port 80 where you are listening , But once this happens, it passes through a new short-term harbor to handle that connection.
In addition, the client is probably using a short-term port to open the connection port 80. Then the possibility of the customer's port some "random" port number specific "fixed" port range (0- 1024).
Comments
Post a Comment