you can purchase databases from websites like ip2location.com.
also, likely free sources are available.
NOTE: ip2locationcan usually inform you about the geographical location associated with an ip address; however, such information is not that reliable ~~ often it's the isp or proxy server address; it can also be spoofed. Example: i'm
in canada but my dedicated web server is in the U.S.; if i remote from my office via my U.S. dedicated server to your website, you would falsely assume that i'm located in the U.S.
g.
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
dakvikas
Member
133 Points
102 Posts
how to get user location like country- state,
May 07, 2012 07:31 PM|LINK
Hi
hopy everyone doing great. i need to find the user state,country how should i do in C#?
Thanks
gerrylowry
All-Star
20577 Points
5721 Posts
Re: how to get user location like country- state,
May 07, 2012 07:55 PM|LINK
@ dakvikas
TIMTOWTDI =. there is more than one way to do it
dakvikas, please clarify:
i'm guessing you mean from their ip address from the HttpRequest (http://msdn.microsoft.com/en-us/library/system.web.httprequest.aspx).
The property UserHostAddress (http://msdn.microsoft.com/en-us/library/system.web.httprequest.userhostaddress.aspx) is your starting point:
"Gets the IP host address of the remote client."
you can purchase databases from websites like ip2location.com.
also, likely free sources are available.
NOTE: ip2location can usually inform you about the geographical location associated with an ip address; however, such information is not that reliable ~~ often it's the isp or proxy server address; it can also be spoofed. Example: i'm in canada but my dedicated web server is in the U.S.; if i remote from my office via my U.S. dedicated server to your website, you would falsely assume that i'm located in the U.S.
g.