Click here to Skip to main content
11,709,120 members (63,712 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: .NET2.0 C#2.0

I want to resolve the IP address from Hostname. I was previosuly using:


Which is obsolete, So I tried:


Which couldn't resolve the IP Address. I am using Windows7 (32-bit)

Please Help..
Thanks in advance..
Posted 28-Nov-12 18:14pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The first thing to try in such a situation is: can you get the the IP address from the hostname using other tools? The simplest thing is executing a ping.
Likely, your DNS is not configured correctly.
Vipin_Arora at 29-Nov-12 22:50pm
Yes, It is pinging perfectly.
Also Ipconfig on this machine showing IP address correctly, the same I am getting from the command:GetHostByAddress

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 580
1 Maciej Los 235
2 Peter Leow 219
3 OriginalGriff 214
4 Mika Wendelius 170
0 OriginalGriff 9,348
1 Sergey Alexandrovich Kryukov 8,727
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856

Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100