473,671 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get IP address from giving hostname in ASP?

Currently, I want to get the IP address from giving hostname in the Active
Server Page. I know the hostname, I want to get the IP address via hostname
in an ASP page.
--
Developer
QA Dashboard
Microsoft China Development Centre
Oct 12 '05 #1
3 4790
=?Utf-8?B?TWljcm9sb25 nwq4=?= wrote on 12 okt 2005 in
microsoft.publi c.inetserver.as p.general:
Currently, I want to get the IP address from giving hostname in the
Active Server Page. I know the hostname, I want to get the IP address
via hostname in an ASP page.


nslookup.exe

but you might compromize your server's security, if you are not caraful
with the necessary changes.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 12 '05 #2
Is there any method or object to support this utiltiy tool?
--
Developer
QA Dashboard
Microsoft China Development Centre
"Evertjan." wrote:
=?Utf-8?B?TWljcm9sb25 nwq4=?= wrote on 12 okt 2005 in
microsoft.publi c.inetserver.as p.general:
Currently, I want to get the IP address from giving hostname in the
Active Server Page. I know the hostname, I want to get the IP address
via hostname in an ASP page.


nslookup.exe

but you might compromize your server's security, if you are not caraful
with the necessary changes.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 12 '05 #3
=?Utf-8?B?TWljcm9sb25 nwq4=?= wrote on 12 okt 2005 in
microsoft.publi c.inetserver.as p.general:
"Evertjan." wrote:
=?Utf-8?B?TWljcm9sb25 nwq4=?= wrote on 12 okt 2005 in
microsoft.publi c.inetserver.as p.general:
> Currently, I want to get the IP address from giving hostname in the
> Active Server Page. I know the hostname, I want to get the IP address
> via hostname in an ASP page.
nslookup.exe

but you might compromize your server's security, if you are not caraful
with the necessary changes.

Is there any method or object to support this utiltiy tool?


[Please do not toppost on usenet]

You could run nslookup in a shell and read the standard-out via a temporary
file, I suppose.

Examples are found via Google.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 12 '05 #4

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

Similar topics

21
15694
by: Alexander N. Spitzer | last post by:
If I have a machine with 3 virtual IP addresses (192.168.1.), how can I start 3 instances of the same RMI application (each started with different properties/configs), each listening on the port 1234, but each instance binds to a different ip address. that is to say: instance #1 binds to 192.168.1.5/port 1234 instance #2 binds to 192.168.1.6/port 1234 instance #3 binds to 192.168.1.7/port 1234
2
18573
by: Darren Kirby | last post by:
Hello list: I am writing a small app in python which tracks the kernel banner at kernel.org and downloads newer kernel version(s) (if there are any). I am using GeoIP to set the download to a local mirror if there is one. This is what I use to get the local IP address: ip = socket.gethostbyaddr(socket.gethostname()) # returns: ('hostname.domain', , )
7
22059
by: none | last post by:
I want to determine the outside (non local, a.k.a. 127.0.0.x) ip addresses of my host. It seems that the socket module provides me with some nifty tools for that but I cannot get it to work correctly it seems. Can someone enlightened show a light on this: import socket def getipaddr(hostname='default'): """Given a hostname, perform a standard (forward) lookup and return a list of IP addresses for that host."""
2
3894
by: Rodrigo C. Souza | last post by:
How to obtain the IP address of the interface that is connected to the Internet? I´m using the code below to get IP address of the local machine: //********************************************* private void button1_Click(object sender, System.EventArgs e) { string HostName = Dns.GetHostName(); lblHostName.Text=HostName; IPHostEntry ipEntry = Dns.GetHostByName (HostName); IPAddress addr = ipEntry.AddressList;
3
1336
by: John J. Hughes II | last post by:
I have an application that uses a socket. One of the users was complaining that it would not work if they put the computer name in but only worked if they put the IP address in. I had them run the below test program and the problem was the first IP address is not valid. Obviously I need to do better checking but does anybody have a clue why such an address would come back anyway? CODE: string HostName = System.Net.Dns.GetHostName();...
6
3620
by: Zytan | last post by:
Once a socket is connected, perhaps to a hostname that contains multiple IP addresses, how can I determine to which IP address the connection is made? The only thing I can get from my Socket is an EndPoint, which doesn't help, since it's abstract, and I need an IPEndPoint to get the data I want (I believe). It is difficult to find information on this, since most results show how to create a socket given an IP address or hostname, not the...
11
26296
by: axlq | last post by:
Does anyone have a favored way of finding the geographic location of a user's IP address, so that a php script can include content relevant to that location? Reverse-lookup of the hostname isn't reliable and often doesn't work, especially if the returned hostname ends with .com, .net, ..info, .biz or other tld that doesn't reveal geographic location. I also see a bunch of commercial services that offer a "country whois" function for a...
3
4890
by: ajd335 | last post by:
Hi all, I am using freeBSD . I have written a PHP script that can give me IP , hostname as well as MAc address of the work station. I have used shell_exec("arp -a"); And than used the perg_match(PHP function ) to get MAC address. That works fine on my PC. But when i run that script on other PCS , It gives me correct IP and hostname , but the arp -a gives me all the data of my Pc , rather than giving me the result of the PC on which...
2
2645
by: Richard Maher | last post by:
Hi, Can someone please tell me the strategy(ies) used by Java (the Security Manager or whatever) to determine if a given IP address conforms to the definition of the codebase from which an applet was retrieved? For example, if an Applet was loaded from mycluster.mydomain.com, and "mycluster" was a cluster alias that was using DNS load-balancing (or round-robin or a.n.other distribution technique) to distribute client connections among...
0
8478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
jinu1996
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...
1
8599
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,...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7439
agi2029
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...
1
6230
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4409
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2052
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1810
bsmnconsultancy
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...

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.