Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to get domain name from IP address

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-05-2009
Member
 
Join Date: Dec 2007
Posts: 93
How to get domain name from IP address
  

Hi,

I have heard from my friends that we can convert an Ip address to an domain name I am very much keen to do that, i have try to find it over internet and i got some of the components where i can do it but is there can coding which i can use it,then it would be great for me.

Reply With Quote
  #2  
Old 02-05-2009
Member
 
Join Date: Apr 2008
Posts: 2,000
Re: How to get domain name from IP address

Sure i will provide you the code for that you need to use the following code:-

Code:
HostName = System.Net.Dns.GetHostName();

IPAddres = System.Net.Dns.GetHostAddresses(HostName).GetValue(0).ToString();
Reply With Quote
  #3  
Old 04-05-2009
Member
 
Join Date: Feb 2008
Posts: 1,845
Re: How to get domain name from IP address

You can also try this code too

Code:
Set DomainName = objRootDSE.OpenDSObject("WinNT://TESTDOM", "abc", "xyz", ADS_SECURE_AUTHENTICATION)

DomainName.Filter = Array("User")
For Each usrName In DomainName
MsgBox usrName.Name
Next
Reply With Quote
  #4  
Old 04-05-2009
Member
 
Join Date: Dec 2007
Posts: 93
Re: How to get domain name from IP address

Thanks for replying me can anyone provide me code get domain name from IP address which is in Vb.Net then i would be very greatfull to him.
Reply With Quote
  #5  
Old 04-05-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: How to get domain name from IP address

At last i have got a code in Vb.Net here goes the code

Code:
Dim myHost As String = System.Net.Dns.GetHostName
Dim myIPs As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(myHost)
Response.Write("Host Name = " & myIPs.HostName & "<br />")
For Each myIP As System.Net.IPAddress In myIPs.AddressList
  Response.Write("The IP address of host is = " & myIP.ToString)
Next
Reply With Quote
  #6  
Old 24-07-2012
Member
 
Join Date: Jul 2012
Posts: 2
Re: How to get domain name from IP address

hi
you can simply get the domain name from ip at whoisxy, Here you give only the domain name it provide necessary detail for you
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to get domain name from IP address"
Thread Thread Starter Forum Replies Last Post
How to get user email address from <domain name\ad-ent id> using dsquery and dsget? tkota Active Directory 1 09-06-2012 07:03 PM
IMpact of changing the IP address of a Domain Controller Ian Wilson Active Directory 6 31-10-2011 08:33 PM
Change IP Address for a Domain Controller which is also an exchange server mosquito_hippy Windows Server Help 4 11-08-2010 09:22 PM
Is there any way to fetch the ip address/Host name of the Domain controller Swati_here_2008 Software Development 4 20-05-2008 02:51 PM
How to change the IP address of Main Domain Controller John Windows Server Help 2 08-05-2007 04:33 AM


All times are GMT +5.5. The time now is 01:01 AM.