473,382 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Dns.Resolve / GetHostByAddress deprecated in c# 2?

Hello, i would like to retrieve the hostname from IP adress, but
according to microsoft (VS 2008 Express), DNS.Resolve and
GetHostByAddress methods seem to be deprecated, and all i found on
google was people who wrote that the new method GetHostEntry didn't
work for what i do, because returned IPadress instead of the hostname.

So my question is : do you know a method for what i would like to do,
that is working well, and that is not deprecated ?
thx
Nico
Apr 2 '08 #1
1 2969
GetHostEntry returns the alias list for an ipaddress, which is all dns will
return from an ipaddress (reverse lookup).
-- bruce (sqlwork.com)
"Nicopilami" wrote:
Hello, i would like to retrieve the hostname from IP adress, but
according to microsoft (VS 2008 Express), DNS.Resolve and
GetHostByAddress methods seem to be deprecated, and all i found on
google was people who wrote that the new method GetHostEntry didn't
work for what i do, because returned IPadress instead of the hostname.

So my question is : do you know a method for what i would like to do,
that is working well, and that is not deprecated ?
thx
Nico
Apr 2 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ruggierorizzi | last post by:
Hi everyone, i would like to know if there is a difference between gethostbyaddress method and $_SERVER. furthermore i hve a little problem using ip address resolution. Some ip address...
1
by: Amy L. | last post by:
When I make the following call: IPHostEntry hostInfo = Dns.GetHostByAddress( hostIPAddress ) ; If the PTR (i.e. the IP address to name resolution) does not exist my program will start making...
1
by: huzz | last post by:
I wrote a method which takes an ip address and returns hostname as shown below. It works fine.. only problem i have is when the passed ip address is not found in the database the method throws this...
0
by: Chris Godwin | last post by:
Can someone please tell me why the following code does not work? System.Net.IPHostEntry iph = System.Net.Dns.GetHostByAddress("66.218.70.49"); I get this error. An unhandled exception...
5
by: Sven | last post by:
Hi! I have a problem with System.Net.Dns.GetHostByAddress(ls_Request.UserHostAddress()).HostName Usually the call GetHostByAddress returns the correct hostname of the client, but sometimes...
1
by: Jed | last post by:
I have a class for logging information about user activity on a web site, but it suddenly became really slow. I was wondering what factors may have caused the slow down. Initially, I used the...
7
by: kvnsdr | last post by:
I can type an IP address and receive Internet domain name and my workstation name however no other IPs of computers on our internal network will resolve to a thier machine name only to the same IP...
0
by: Mike Kansky | last post by:
DNS.GetHostByAddress runs very slow for foreign IPs. I heard that DNS.BeginResolve can make asynchronous IP to Host resolve. Can anyone provide me an example of VB.NET code that would make...
5
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I am trying to get the DNS name of an arbitrary IP address on the network. If I use GetHostEntry as the documentation suggests I only get the name of the machine I am running the code on. All...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.