Click here to Skip to main content
13,738,103 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 18 Nov 2011
Licenced CPOL

Whats My IP Address ?

, 18 Nov 2011
protected void Page_Load(object sender, EventArgs e){ HttpBrowserCapabilities bc = Request.Browser; Label1.Text = "IP Address=" + Request.UserHostAddress;}


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

21 Sep 2011
Anshul R
Private Sub GetIPAddress()Dim strHostName As StringDim strIPAddress As StringstrHostName = System.Net.Dns.GetHostName()strIPAddress = System.Net.Dns.Resolve(strHostName).AddressList(0).ToString()MessageBox.Show("Host Name: " & strHostName & "; IP Address: " &...
22 Sep 2011
On Vista/Win 7, I have seen code where only a single period is returned for (0). This makes sure you get the actual IP regardless of the system.Const IPPattern As String = "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$"With Dns.GetHostEntry(System.Environment.MachineName) Return...
24 Nov 2011
Dim ipE As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName) Dim AL As Array = Dns.GetHostEntry(vWrkStn).AddressList Dim A As IPAddress For Each A In AL If A.AddressFamily = Sockets.AddressFamily.InterNetwork Then ...
14 Sep 2011
Mohammad A Rahman
namespace IpAddresses{ using System; using System.Collections.Generic; using System.Linq; using System.Net; class Program { static void Main(string[] args) { GetIPAddresses().ForEach(ip => Console.WriteLine(ip)); } ...
13 Sep 2011
Koshy Panicker John
6 alternatives  
Different Method(s) to Find IP Address?
20 Sep 2011
I find this useful:Dim st As System.IO.StreamDim sr As System.IO.StreamReaderDim req As System.Net.WebRequest = System.Net.WebRequest.Create("")Dim resp As System.Net.WebResponse = req.GetResponsest = resp.GetResponseStreamsr =...


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Technical Lead Erls Corporation
India India
I am Dinesh kumar Choudhary by Name, a software Designer and Developer by Work, a Indian Hindu by Religion, Co-Founder of DSFoundation located at by profession, a Loving husband and a Caring Father by Relation.

I have a blog Website at DSFoundation is the Autonomous body to serve for the management of Local shops located at New Delhi, India. Now a days DSFoundation and its subsidiaries are managed by Erls Corporation, an Another initiative by me and my colleagues, in which i am the another CO-Founder of the Organization. Erls Corporation can be located at

| | Privacy | Cookies | Terms of Use | Mobile
Web01-2016 | 2.8.180920.1 | Last Updated 18 Nov 2011
Article Copyright 2011 by Denno.Secqtinstien
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid