Resolve IP from No-IP DNS A

I need to Resolve the IP from my No-IP Hostname, which I setup because I'm behind a Router and this Router doesn't have a static public IP. The hostname is setup as a DNS A record. I need the IP to reverse connect from a computer to my own pc.

I already tried it with:

IPAddress address = Dns.GetHostAddresses("****")[0];

But that only writes "" to "address".

Can someone help me?


I think, the problem is, that "****" is not a resolvable IP adress. In my example i use "" and it works fine.

What GetHostAddresses does is, asking the name service of your computer if it knows that concrete name. And if it doesn't know itself, it will ask its parent, and so on. If somebody knows the name, it will give that ip to you. But for that to work, you have to ask for a concrete resolvable name.

Also, you should check, if the returned list is empty:

        System.Net.IPAddress[] adresses = System.Net.Dns.GetHostAddresses("");
        if (adresses.Length > 0)
            System.Net.IPAddress address = System.Net.Dns.GetHostAddresses("")[0];

It look's like you are using DynDNS, so the name you are looking for should be well known. If you don't get the correct ip for it, then there is something wrong with the setup of your dns system.

Need Your Help

Facebook cdn Profile Picture Url Forbidden 403

javascript angularjs database facebook sdk

I have been using the FB Javascript SDK for Oauth login in one of my angular apps. The GET request for the pictures url saved in my database throws a forbidden error after some time. and the image ...