I have an application that does a reverse lookup using
System.net.dns. gethostbyaddres s, however I am encountering some problems.
If the application resolves the address of another machine it works fine,
but when resolving its own address, I get incorrect results.
SERVERA has 2 IP addresses (IPA1, IPA2). Each IP address has one DNS entry
(HOSTA1, HOSTA2)
SERVERB has 2 IP addresses (IPB1, IPB2). Each IP address has one DNS entry
(HOSTB1, HOSTB2)
If my application runs on SERVERA:
IPB1 resolves to HOSTB1
IPB2 resolves to HOSTB2
but...
IPA1 resolves to HOSTA1
IPA2 resolves to HOSTA1
If my application runs on SERVERB:
IPA1 resolves to HOSTA1
IPA2 resolves to HOSTA2
but...
IPB1 resolves to HOSTB1
IPB2 resolves to HOSTB1
Am I crazy? 3 1677
can u do one ip at a times until ip resolved.
Jerome Lavalley, MCSE wrote: I have an application that does a reverse lookup using System.net.dns .gethostbyaddre ss, however I am encountering some problems.
If the application resolves the address of another machine it works fine, but when resolving its own address, I get incorrect results.
SERVERA has 2 IP addresses (IPA1, IPA2). Each IP address has one DNS entry (HOSTA1, HOSTA2) SERVERB has 2 IP addresses (IPB1, IPB2). Each IP address has one DNS entry (HOSTB1, HOSTB2)
If my application runs on SERVERA:
IPB1 resolves to HOSTB1 IPB2 resolves to HOSTB2
but...
IPA1 resolves to HOSTA1 IPA2 resolves to HOSTA1
If my application runs on SERVERB:
IPA1 resolves to HOSTA1 IPA2 resolves to HOSTA2
but...
IPB1 resolves to HOSTB1 IPB2 resolves to HOSTB1
Am I crazy?
No. I am only given one IP address and want the DNS entry that corresponds
with it.
Is no one else using this method?
I thought this method was using DNS, but clearly its not. Its doing
something different for the local machine. Any clue how I can force it to
use DNS?? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 are resolved other not. Why?
|
by: Rushikesh Joshi |
last post by:
Hi Friends
I am having some query.
On a server two site hosted
1) magnamags.com
2) stardustindia.com
Now when I am resolving the IP address for this both sites. I am
getting 202.71.136.211 (using GetHostByName).
|
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 Netbios calls (Name query to the remote host).
The netbios lookup is very undesired.
Is there a way to not perform the netbios query if the PTR record does not
exist?
|
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 error message :
The requested name is valid and was found in the database, but it does not
have the correct associated data being resolved for
How can i prevent this error message and instead return "-" ?
Many Thanks.
|
by: RZ |
last post by:
Hi Folks,
I wrote an app to scan our Packet Filter logs for certain IPs. It uses
GetHostByAddress().
I used multi-threading to get around the 2 second hang. The remaining
problem is that
GetHostByAddress() also attempts to resolve the machine name via NetBIOS.
After
running the application, the blocked packets to port 137 from our own IP are
added
| |
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 I get a hostname like _CERDR1342B88E.
Why? The clients are running under Windows CE.NET 4.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 following code:
ul.HostName = context.Request.UserHostName;
Since the UserHostName is not always resolved, I opted for the following
more effective code:
IPAddress hostIPAddress = IPAddress.Parse(context.Request.UserHostAddress);
|
by: Dave |
last post by:
I don't suppose anyone will be able to help with this, it's most odd. I use
IPHostEntry hostInfo = GetHostByAddress(ipAddress)
to resolve an IP address to a name (in this case it is actually the local
computer, if that's relevant). The call is made on several occasions as the
program runs, the first two times it works fine, then, for no reason, instead
of the name it returns the IP address in hostInfo.HostName. This program has
been...
|
by: Steve Richter |
last post by:
I am using Dns.GetHostByAddress and Dns.Resolve to successfully
resolve and IP address to an IPEndPoint.
IPEndPoint ep = null;
IPAddress ipAddr = IPAddress.Parse(m_sRemoteHost);
ep = new IPEndPoint(Dns.GetHostByAddress(ipAddr).AddressList,
m_iRemotePort);
// ep = new IPEndPoint(Dns.GetHostEntry(ipAddr).AddressList,
m_iRemotePort);
// ep = new IPEndPoint(Dns.Resolve(m_sRemoteHost).AddressList,
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |