2
I have a WPF application. I need to know the external IP of the machine running this application.
I found some tutorials that teach to do this through the method DownloadString()
class WebClient
consuming some services such as dyndns.org
, icanhazip.com
, finally several services.
It would be something like that:
string meuIp = new WebClient().DownloadString("http://icanhazip.com");
To use such services I need to implement the query in at least two or three to ensure a contingency in case some service stops working or is discontinued.
Does anyone know if it is possible to do this natively with . Net Framework without using third-party services?
What kind of application are you using? could put like this trying to do.
– Marco Souza