User's Country and IP address

Discussion in 'ASP.NET 2.0' started by bjose, Mar 6, 2007.

  1. Dear All,

    I am in need to find the country and IP address of the person who is viewing my website. Does anyone know how to do this in Asp.Net version 2.

    Thanks in anticipation
    B Jose
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Getting the IP address is simple, it should be available with

    Request.ServerVariables("REMOTE_ADDR")

    Getting the Country is a little more tricky. You'll have to use some sort of database(or IP lookup service) to lookup the country where the IP is located. Check out http://www.maxmind.com/app/ip-location


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page