how to get user location like country- state,http://forums.asp.net/t/1801110.aspx/1?how+to+get+user+location+like+country+state+Mon, 07 May 2012 19:55:52 -040018011104969678http://forums.asp.net/p/1801110/4969678.aspx/1?how+to+get+user+location+like+country+state+how to get user location like country- state, <p>Hi&nbsp;</p> <p>hopy everyone doing great. i need to find the user state,country how should i do in C#?</p> <p>Thanks&nbsp;</p> 2012-05-07T19:31:19-04:004969701http://forums.asp.net/p/1801110/4969701.aspx/1?Re+how+to+get+user+location+like+country+state+Re: how to get user location like country- state, <p>@ <a title="dakvikas" href="http://forums.asp.net/members/dakvikas.aspx">dakvikas</a></p> <p>TIMTOWTDI&nbsp; =.&nbsp; there is more than one way to do it</p> <p><a title="dakvikas" href="http://forums.asp.net/members/dakvikas.aspx">dakvikas</a>, please clarify:</p> <p></p> <blockquote><span class="icon-blockquote"></span> <h4>dakvikas</h4> <p></p> <p>i need to find the user state,country</p> <p></p> </blockquote> <p></p> <p>i'm <em>guessing</em> you mean from their <strong>ip address</strong> from the HttpRequest (<a href="http://msdn.microsoft.com/en-us/library/system.web.httprequest.aspx">http://msdn.microsoft.com/en-us/library/system.web.httprequest.aspx</a>).</p> <p>The property UserHostAddress (<a href="http://msdn.microsoft.com/en-us/library/system.web.httprequest.userhostaddress.aspx">http://msdn.microsoft.com/en-us/library/system.web.httprequest.userhostaddress.aspx</a>) is your starting point:</p> <p style="padding-left:60px">&quot;Gets the IP host address of the remote client.&quot;</p> <p>you can purchase databases from websites like ip2location.com.</p> <p>also, likely free sources are available.</p> <p>NOTE:&nbsp;&nbsp;&nbsp;<b>ip2location</b> <i>can usually inform you about the geographical location associated with an ip address</i>; however, such information is not that reliable ~~ often it's the isp or proxy server address; it can also be spoofed.&nbsp;&nbsp; Example:&nbsp; 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.</p> <p>g.</p> 2012-05-07T19:55:52-04:00