Products
Database Search Solution (New Version) Search Control SEO Pager Highlighter Shortcut Controls Crypt Package Free ASP.NET Controls
Geotargeting Component ASP.NET Media Player Control Flash Video Player Control Services
ASP.NET Telecommute Jobs Free IP Location Lookup Test .Net Regular Expressions CSS/Table/DIV Page Layouts Custom Programming Article Sites Master List |
FREE Geo Targeting ASP.NET ComponentGeo Targeting component is free ASP.NET component based on C# API of MaxMind. With Geotargeting component you can find out more about location of your web site visitor, like visitor's city or country. You can use this information to display more relevant ads or content to your users. Free Geo Targeting component featuresComponent can use free GeoLite City database or paid GeoIP City database which is more accurate. You can get these data about your visitor location: - Country name - Country code - Region - City - Postal code - Area code - Dma - Latitude - Longitude How to implement geo targeting on your siteTo implement geo targeting on your ASP.NET web site, follow these three simple steps: 1. Set up geo targeting databaseDownload free GeoCity Lite database from here. Unpack it somewhere on your local disk to get GeoLiteCity.dat file. Upload GeoLiteCity.dat file to your web server, for example in /App_Data/ directory. 2. Install Geotargeting ComponentFirst download free Geotargeting .Net Component. Download Getoargeting .Net 1.1 for use with .Net Framework 1.1 web application, or Geotargeting .Net 2 for use with .Net Framework 2.0 or .Net Framework 3.5. Unzip .zip file to get component's dll. Upload dll to your web application's /bin/ folder. 3. Get Visitor City, Country and other information with ASP.NET codeNow everything is ready to use geo targeting on your web site. To get wanted information you can use a code like this: [ C# ] public partial class _Default : System.Web.UI.Page [ VB.NET ] Partial Class Test_DefaultVB
That is all you need to do! Enjoy in new feature of your web site :) Common errors during implementationIf you access to sample code through a local area network or through a http://localhost/ you'll get an error "Object reference not set to an instance of an object". Note that this technique doesn't return location information directly, but based on IP address. When you try to run example on http://localhost/ IP address is 127.0.0.1 If you set incorrect path to .dat file, you'll get the same error. In that case check value of FullDBPath variable in example code and check is GeoLiteCity.dat file existing in specified location. Geo targeting maintenanceData about IP addresses are not constant. They change over time and database becomes less accurate. Because of that, MaxMind refreshes its databases every month to include those changes and provide correct results. You need to download .dat file once per month and upload it to your web site over old file. Comparation between free version and commercial version of databaseBoth databases works on completely same way. You can use Geotargeting component with both editions. However, commercial version have more accurate data. You can see all differences in table at the bottom of this page. Tutorial toolbar: Tell A Friend | Add to favorites | Feedback |