How can we get the client machine name through WCF?

Posted by Kundan64 under WCF on 5/8/2013 | Points: 10 | Views : 7146 | Status : [Member] | Replies : 2
How can we get the client machine name through WCF, when running the WCF from Silverlight application?

Thanks in Advance




Responses

Posted by: Ranjeet_8 on: 5/8/2013 [Member] [MVP] Gold | Points: 25

Up
0
Down
Try this,

RemoteEndpointMessageProperty ClientProperty = OperationContext.Current.IncomingMessageProperties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;

Console.WriteLine("Remote address is: {0}", ClientProperty.Address);


Please Mark As Answer if this helps you.

.

Kundan64, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kundan64 on: 5/10/2013 [Member] Starter | Points: 25

Up
0
Down
Hi Ranjeet,

Your code is not giving the Client Computer Name, its giving the IP Address (for default IP Address: 127.0.0.1 its giving ":1").
Thanks


Kundan64, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response