| Author: saravanakumar 12 Jan 2009 | Member Level: Gold | Rating:  Points: 3 |
hi lakshmi,
try this,
//String to Get the Ip Address Of The Machine string iphost = Dns.GetHostName(); IPHostEntry ip = Dns.GetHostByName(iphost); string ipadd = ip.AddressList.GetValue(0).ToString(); //string to get IP string IP; IP = ipadd.ToString();
regards, saravan
|
| Author: divya 12 Jan 2009 | Member Level: Gold | Rating:  Points: 3 |
Hi, Check the following
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'To find the ip address of the system Dim localEntry As Net.IPHostEntry = Dns.GetHostEntry(System.Net.Dns.GetHostName) For Each address As Net.IPAddress In localEntry.AddressList Response.Write("You System IP is") Response.Write(address.ToString()) Next End Sub
|
| Author: jumbo 12 Jan 2009 | Member Level: Gold | Rating:  Points: 4 |
To find the ip address of the machine or machines connected in the networks. There is SMO (Sql Server Management Object) that is provided by the sql server 2005 as a new feature.
So to find out the ip address use SMO object.
or you can use the following code:
Dim ipAddress As Net.IPHostEntry = Dns.GetHostEntry(System.Net.Dns.GetHostName) For Each address As Net.IPAddress In ipAddress.AddressList
This will give you all the machines in the network.
Enjoy the code.
-------------------------
How to find out the IP address of the systems connected to LAN network using asp.net? example code
|