I have Remoting App (on tcp channel with no web server). I need to
know the Client IP(public ip). I not find any way to retrieve this
info when client call remoting procedure (singelton)?
So my Q is how can client know his public IP to send it to server?
Peter Duniho - 24 Mar 2008 17:41 GMT
> I have Remoting App (on tcp channel with no web server). I need to
> know the Client IP(public ip). I not find any way to retrieve this
> info when client call remoting procedure (singelton)?
> So my Q is how can client know his public IP to send it to server?
I don't know if this is exposed via .NET, but if it is you're looking for
"Universal Plug and Play" (aka "UPnP"). Probably in the WMI classes.
Keep in mind that just knowing your Internet IP address is unlikely to be
sufficient. If you really need to know that address (and there's a good
chance you don't), you probably also need to configure the router
identified via UPnP to forward traffic sent to that address on a specific
port to your own local host computer and application.
Other than "how" to get at the UPnP information, this is really more of a
networking question than a .NET question and you'll probably get better,
more detailed answers in a newsgroup dedicated to networking questions.
Pete
Peter Ritchie [C# MVP] - 26 Mar 2008 16:14 GMT
Your public IP is often assigned by your ISP--to which you likely have no
access.
There's various web-sites out there that will echo back your IP, for example
http://www.whatismyip.com/

Signature
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
> I have Remoting App (on tcp channel with no web server). I need to
> know the Client IP(public ip). I not find any way to retrieve this
> info when client call remoting procedure (singelton)?
> So my Q is how can client know his public IP to send it to server?