Search code examples
c#wcf.net-4.0wcf-4

How Get Client IP. MAC. PC name use wcf4 (tcp/ip mode)


I have a wcf service running on LAN server, use tcp/ip mode. Now I need to get every client info when the client send request connect the wcf service. Because it's all on LAN. I just need get the client MAC, IP , PC name. Is there any way to get these info ? thanks.


Solution

  • http://msdn.microsoft.com/en-us/library/system.environment.machinename(v=vs.110).aspx for computer name

    Get public/external IP address? for ip address

    Reliable method to get machine's MAC address in C# for MAC

    Please consider googleing before posting a question, I found these answers in 2 minutes.