I want to get domain name from a given IP.
E.g If I give IP as “172.24.17.85” I should get only domain name like my domain name is sonata.net.
Any code snippet for this in C#?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have you tried
Dns.GetHostEntry?Example:
Note that this didn’t work for the example you gave… if a reverse DNS lookup doesn’t work, I’m not sure what you can do.