• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.


Geolocating Using a  Web Service Example

Page history last edited by PBworks 9 years, 7 months ago

 Geolocating Using a Web Service





Knowledge of .NET, Visual Studio


Description of Video


In this example I use a commercial web service to convert an IP Address into location information. The example goes through the full coding of the application.




Download Link (right click and save target as ...). 



Reference Materials


Location of Web Service




Code from example application.


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim ws As New IP2Location.Ip2LocationWebService
        Dim location As New IP2Location.IP2LOCATION

        Dim ip(10) As System.Net.IPAddress
        Dim dns As System.Net.Dns
        Dim host As String

        host = dns.GetHostName()

        ip = dns.GetHostAddresses(host)
        lblIP.Text = ip(0).ToString

        location = ws.IP2Location(lblIP.Text, "Your Key Here")

        lblCity.Text = location.ToString

    End Sub


Additional Information


References to Web Services that can be used for Geocoding are available at Technologies Used in Web Systems


Comments (0)

You don't have permission to comment on this page.