简体   繁体   中英

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 ip 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM