How to get the client ip address from a Silverlight 4 out of browser app?
I would like to know what the ip address of a Silverlight 4 out of browser application. This would be the 开发者_如何学Cip address that is on the internet, not the LAN ip. I am communicating with a WCF service that is NOT hosted by IIS but by my own Windows service.
I'd say the best way is to send a request off to a really dumb web service whose sole job is to return the IP address of the requester back.
It'd be async, though, so that may not be great depending on your scenario. And of course if the IP address changed (DHCP renewed, say) then you wouldn't know to go ask again.
Why do you want to know the client IP address? Maybe there's a way to solve your problem without needing to know it.
精彩评论