Two Methods for you problem
Common Step:
Get Client IP:
Request.ServerVariables["HTTP_X_FORWARDED_FOR"]
and
Request.ServerVariables["REMOTE_ADDR"]
(one for normal access and other for proxy access.
1. Then you can either get the database of ip list and add it in your database and get the details according to the ip. Link:(forgot the link)
2. Use geo bytes web service to get ip details.
Ex:
var etime_url = 'http://gd.geobytes.com/Gd?after=-1&variables=GeobytesCountry,GeobytesCity,GeobytesRegion';
AjaxCallFullUrl( etime_url, 'geolocation');
setTimeout("generateLocation()",2000);
Happy Coding......