UtilWebGeoLocate(IPAddress) Method
Estimates the real-world geographic location of an IPv4 address.
Namespace: DevCase.Core.Networking.CommonAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static GeoInfo GeoLocate(
IPAddress address
)
Public Shared Function GeoLocate (
address As IPAddress
) As GeoInfo
Dim address As IPAddress
Dim returnValue As GeoInfo
returnValue = UtilWeb.GeoLocate(address)
public:
static GeoInfo^ GeoLocate(
IPAddress^ address
)
static member GeoLocate :
address : IPAddress -> GeoInfo
No code example is currently available or this language may not be supported.
- address IPAddress
-
The IPv4 address to geolocate (eg. "128.0.0.0").
GeoInfo
A
GeoInfo instance that represents the geographic location info.
This is a code example.
No code example is currently available or this language may not be supported.
Dim ip As IPAddress = IPAddress.Parse("128.0.0.0")
Dim gi As GeoInfo = GeoLocate(ip)
Dim sb As New Global.System.Text.StringBuilder
With sb
.AppendLine(String.Format("Hostname....: {0}", gi.Hostname))
.AppendLine(String.Format("Ip Address..: {0}", gi.Ip))
.AppendLine(String.Format("Country Name: {0}", gi.CountryName))
.AppendLine(String.Format("Country Code: {0}", gi.CountryCode))
.AppendLine(String.Format("Region Name: {0}", gi.RegionName))
.AppendLine(String.Format("Region Code: {0}", gi.RegionCode))
.AppendLine(String.Format("City........: {0}", gi.City))
.AppendLine(String.Format("Postal Code.: {0}", gi.PostalCode))
.AppendLine(String.Format("Latitude....: {0}", gi.Latitude))
.AppendLine(String.Format("Longitude...: {0}", gi.Longitude))
End With
Console.WriteLine(sb.ToString())
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
HttpListenerException
|
The returned gegraphic location info is empty due to an unknown error.
or
The server cannot properly process the request. Please, ensure the host name or IP address is valid.
|