I've set up my own whatsmyip type site that returns a simple string of the callers external IP.
But I can't figure out how to get the queried text into an asp control for use.
I can load it up in an iframe and see it on the page, but accessing it and using it is blocked for built in security reasons.
I can get it working server side with ~WebClient.DownloadString("Whatsmyip.com"). But I need the client's IP, not the web servers.
Thanks!
Do you have to use whatsmyip.com? You can also get a users ip address through HttpContext.Request.UserHostAddress
.
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.