Contents

IP SearchLight for ASP.NET (Quickstart)

Performance & Data Sources

Object Reference

Example Code

Licensing & Registration

   Registration

   License





IPSearchLight for ASP.NET


IPSearchLight for ASP.NET gives you real-time feedback on the geographic location of website visitors by their IP address alone.  The technology is completely uninvasive, yet can often track a person's location to a few miles radius on the planet.

Some potential IPSearchLight uses:


IPSearchLight for ASP.NET benefits from 1 click integration with the Microsoft Visual Studio toolbox.  It is packaged as a web control and can be implemented with minimal code overhead.

Quickstart:

IPSearchLight is most easily installed by using the installer executable, which can be downloaded from www.ipsearchlight.com.


Choose the directory you wish to install to (the given directory is recommended) and the installer will begin to extract and copy the database and other files:

 The Installer will then automatically install IPSearchLight to the Microsoft Visual Studio Toolbox.



To use IPSearchLight, drag the WebControl onto your ASPX page from the Toolbox.  

The component's properties are visible in the properties dialog window.  The component will automatically detect each website visitor's location and IP address.  Properties including longitude, latitude, state, country and postal (zip) code are then programatically accessible (See the examples section for more information).

You will need to acquire a Trial or Full License Key from www.ipsearchlight.com (it will run only 3 times without it).
The license file should be placed in your website as follows: "{root}/bin/IPSearchLight.GeoLocator.lic"

Your Trial License will expire after 30 days.  When that happens, you may see the above error message.

If you find that the data responses you're getting out of the IPSearchLight component arenot sufficiently accurate, there are several upgrade options available.

 

 



Performance & Data Sources


IPSearchLight uses the highest quality data provider available, MaxMind LLC. The database that comes packaged with IPSearchLight is MaxMind's GeoLiteCity. This is affordable and perfectly accurate for country detection and reasonably accurate at the regional and city level.  If you require a greater degree of accuracy, IPSearchLight facilitates two straightforward options:

  1. Purchase an Enterprise Database and optionally, successive updates from MaxMind LLC.
  2. Purchase access to a MaxMind's Enterprise WebService.

These two options offer the highest quality GeoLocation data available.  

 

Lite Database

This is the default, packaged solution.  When installing the IPSearchLight component, it is automatically installed to the following directory (by default): C:\Program Files\IPSearchLight\Database\GeoIPCity.dat

In Microsoft Visual Studio you may also point the Database_Path_or_URL variable to a different location, in either of the following formats:


Enterprise Database

The Full MaxMind GeoIPCity database is used in precisely the same manner as the Lite database.  It can be purchased directly from MaxMind.  Simply download the new database, and update the Database_Path_or_URL property accordingly.

 

Enterprise WebService

MaxMind also offer a WebService, which provides excellent quality.  Unless you expect an extremely high volume of traffic, this option delivers the best value. 

Buy MaxMind GeoIP City/ISP/Organization Web Service Queries online

When you've obtained your MaxMind WebService license key, set the property Web_Service_Key to this value.  Using this key will override the use of any physical database installed.


 

 



Object Reference


Object Reference for resource: IPSearchlight.GeoLocator

 

 

 

 

 

 

Writable Properties

 Database_Path_or_URL

The full file path or URL to the IPSearchlight Database File.

For example: "C:\Program Files\IPSearchLight\Database\GeoIPCity.dat" or "~/Database/GeoIPCity.dat"

 IP_or_Host

The IP Address or Host Name to be geogrpahcally looked up. 

For example: "216.239.37.99" or "www.google.com"

If this parameter is not set, the GeoLocator will automatically detect your site visitors' IP addresses.

Web_Service_Key

The MaxMind GeoIP City/ISP/Organization Web ServiceLicense Key.  When specified, it overrides Database_Path_or_URL and data is fetched across the internet.

 

 

Read-Only Properties (geographically resolved against IP_or_Host)

 Country_Code

Country code using the ISO 3166 Country Code standard. 

 Country_Name

Country name.

 Region

Region or state code.  For US and Canada, denotes state or province using ISO-3166-2 standard.  For all other nations, uses FIPS 10-4  code.  For example: "NY" or "Greater London".

 City

City or town name.

 Postal_Code

Zip/Postal Codes for US and Canadian Addresses.

 Latitude

Latitude to 12 to a high degree of accuracy.

 Longitude

Longitude to 12 to a high degree of accuracy.

 Area_Code

Three digit regional telephone code, for US lookups only.

 DMA_Code

Designated Market Area defined by code .

ISP

The Internet Service Provider for the IP address.  Only available when using the Web Service.

 Organization

The Organization associated with the IP address.  Only available when using the Web Service.







 



Example Code in C# and VB.Net



C#

<%@ Page Language="C#" AutoEventWireup="true"  %>
<%@ Register Assembly="IPSearchLight" Namespace="IPSearchLight" TagPrefix="IPSearchLight" %>

<script runat="server">

protected void Page_Load(object sender, EventArgs e)
{
    LabelCountryCode.Text = GeoLocator1.Country_Code;
    LabelCountryName.Text = GeoLocator1.Country_Name;
    LabelRegion.Text = GeoLocator1.Region;
    LabelCity.Text = GeoLocator1.City;
    LabelPostalCode.Text = GeoLocator1.Postal_Code;
    LabelLatitude.Text = GeoLocator1.Latitude.ToString();
    LabelLongitude.Text = GeoLocator1.Longitude.ToString();
    LabelAreaCode.Text = GeoLocator1.Area_Code.ToString();
    LabelDMACode.Text = GeoLocator1.DMA_Code.ToString();
    LabelISP.Text = GeoLocator1.ISP;
    LabelOrganization.Text = GeoLocator1.Organization;
}

</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>IPSearchLight Test</title>
</head>
<body>
<form id="form1" runat="server">

<!--- (Option1) Allow AutoDetection of IP Address (using server variables): -->

<IPSearchLight:GeoLocator ID="GeoLocator1" runat="server" />

 

<!--- (Option2) Hardcode the IP Address: -->
<% //<IPSearchLight:GeoLocator ID="GeoLocator2" runat="server" IP_or_Host="216.239.37.104" /> %>

 

<!--- (Option3) Hardcode the Database Path: -->
<% //<IPSearchLight:GeoLocator ID="GeoLocator3" runat="server" Database_Path_or_URL="~/Database/GeoIPCity.dat" /> %>

 

<!--- (Option4) Hardcode the Web Service License Key: -->
<% //<IPSearchLight:GeoLocator ID="GeoLocator4" runat="server" Web_Service_Key="MAXMIND_KEY" /> %>

 

<asp:Label ID="LabelCountryCode" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelCountryName" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelRegion" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelCity" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelPostalCode" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelLatitude" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelLongitude" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelAreaCode" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelDMACode" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelISP" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelOrganization" runat="server" Text="Label"></asp:Label>

</form>
</body>
</html>

VB.Net

<%@ Page Language="VB" AutoEventWireup="true"  %>
<%@ Register Assembly="IPSearchLight" Namespace="IPSearchLight" TagPrefix="IPSearchLight" %>

<script runat="server">

Sub Page_Load(sender As Object, e As System.EventArgs)
    LabelCountryCode.Text = GeoLocator1.Country_Code
    LabelCountryName.Text = GeoLocator1.Country_Name
    LabelRegion.Text = GeoLocator1.Region
    LabelCity.Text = GeoLocator1.City
    LabelPostalCode.Text = GeoLocator1.Postal_Code
    LabelLatitude.Text = GeoLocator1.Latitude
    LabelLongitude.Text = GeoLocator1.Longitude
    LabelAreaCode.Text = GeoLocator1.Area_Code
    LabelDMACode.Text = GeoLocator1.DMA_Code
    LabelISP.Text = GeoLocator1.ISP
    LabelOrganization.Text= GeoLocator1.Organization
End Sub

</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>IPSearchLight Test</title>
</head>
<body>
<form id="form1" runat="server">

<!--- (Option1) Allow AutoDetection of IP Address (using server variables): -->

<IPSearchLight:GeoLocator ID="GeoLocator1" runat="server" />

 

<!--- (Option2) Hardcode the IP Address: -->

<% '<IPSearchLight:GeoLocator ID="GeoLocator2" runat="server" IP_or_Host="216.239.37.104" /> %>

 

<!--- (Option3) Hardcode the Database Path: -->

<% '<IPSearchLight:GeoLocator ID="GeoLocator3" runat="server" Database_Path_or_URL="~/Database/GeoIPCity.dat" /> %>

 

<!--- (Option4) Hardcode the Web Service License Key: -->

<% '<IPSearchLight:GeoLocator ID="GeoLocator4" runat="server" Web_Service_Key="MAXMIND_KEY" /> %>

 

<asp:Label ID="LabelCountryCode" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelCountryName" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelRegion" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelCity" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelPostalCode" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelLatitude" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelLongitude" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelAreaCode" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelDMACode" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelISP" runat="server" Text="Label"></asp:Label>
<asp:Label ID="LabelOrganization" runat="server" Text="Label"></asp:Label>

</form>
</body>
</html>




 



Registration


You will need to acquire a Trial or Full License Key from www.ipsearchlight.com (it will run only 3 times without it).
The license file should be placed in your website as follows: "{root}/bin/IPSearchLight.GeoLocator.lic" .

If you're having problems with this step, please contact us at support@ipsearchlight.com.











License


IPSearchLight.com hereby grants you a non-exclusive license to the IPSearchLight Software Component (the Software).  By downloading or using the Software, the Licensee agrees not to utilize the software in a manner which is disparaging to IPSearchLight.com, and not to rent, lease, distribute or otherwise transfer rights to the Software.
 
The Licensee agrees that no attempt will be made by the Licensee or associated parties to translate, reverse engineer, modify, decompile, disassemble or distribute the Software.
 
License terms are offered on the following terms, as purchased. If no purchase or insufficient purchase has been made then the Free Trial License terms apply.


FREE TRIAL LICENSE allows the use of the software by one developer for private evaluation purposes only.  The software should not be used for public or commercial use of any kind.  This trial should not be used for more than 30 days.

SERVER LICENSE allows the usage of the software on a singe server.

ENTERPRISE LICENSE allows the usage of the software on any number of servers owned by one organization.


UPGRADES
If a new release of the software or its data-source are produced then you will be entitled to request  a free upgrade from IPSearchLight.com.  IPSearchLight.com does not guarantee any right to enhancement or update beyond the initial purchase, but will endeavor to offer upgrades and support wherever possible.

COPYRIGHT
The Software is protected by international copyright laws. Copyright for the GeoLite Databases and the associated API code remains with MaxMind LLC, NJ, USA  . All other title, ownership rights, and intellectual property rights in the Software is the property of IPSearchLight.com and may be protected by applicable copyright or other law. This License gives you no rights to such content.
 
LIMITATION OF LIABILITY.
THIS SOFTWARE IS PROVIDED "AS IS," WITHOUT A WARRANTY OF ANY KIND. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. IPSEARCHLIGHT.COM AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL IPSEARCHLIGHT.COM  OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF IPSEARCHLIGHT.COM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 
MISCELLANEOUS
This software is not designed or intended for use in on-line control of aircraft, air traffic, aircraft navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility. Licensee represents and warrants that it will not use or redistribute the Software for such purposes.