vb.net - How to get ip address for the local system -
Hi friends I am developing an application in which I am returning the IP address to a specific system and it Saving in database. When I check the database, this server is showing IP address. I want to get the special IP address that is running that application.
So far I have this code:
public function GetIPAddress () string string strHostName as string = system.Net.Dns.GetHostName () Dimension string strHostName1 = System.Net.Dns.GetHostName () Dim ipHostInfo as System.Net.IPHostEntry = System.Net.Dns.Resolve (System.Net.Dns.GetHostName ()) Dim IPAddress as System.Net.IPAddress = ipHostInfo. AddressList (0) IPAddress.ToString () termination function
Keep in mind that in a machine Many IP addresses may be pointed out, so this is not really possible. Well, not even in theory - in practice, you can work to some extent together.
Comments
Post a Comment