Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Hostname not resolving

Hello all,

I'm running into an issue where I cannot get my android app to resolve a hostname to an IP address using C# methods (Dns.GetHostEntry/GetHostAddresses) or Java methods (InetAddress.GetByName). A console application running the same Dns C# calls can resolve it correctly from my windows PC, my Linux devices can resolve it correctly via the terminal as well as from a simple python script, but I cannot get the android app to resolve the hostname.

I made sure I had the relevant permissions enabled for my app, and if I manually supply the IP address of the device I'm trying to resolve the hostname for I can connect to it, it just seems that the normal and android specific methods do not seem to be able to query that information from the same DNS server that other devices on my network are able to use successfully.

Any suggestions would be appreciated.

Sign In or Register to comment.