note: In fact, it gets the user language of requesting Browser(ep.Chrome), but if we only want to get the Country, not detail location, i recommend this way
Request.UserLanguages because it doesn't rely on 3rd site or tool;
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
4 Points
13 Posts
Client Public IP address and Location
Feb 01, 2018 05:01 AM|tikaramk|LINK
How do i get web client public ip address and country ?
Participant
1644 Points
792 Posts
Re: Client Public IP address and Location
Feb 01, 2018 09:21 AM|rajesh93180|LINK
Hello tikaramk
Please check the below links. You may have to use external tools to achieve this.
How to get client's IP address using JavaScript only?
How to get ip address using javascript or jQuery?
Thanks,
Rajesh
Mark as answer if you find this post helpful.
Contributor
5290 Points
2307 Posts
Re: Client Public IP address and Location
Feb 02, 2018 08:06 AM|AngelinaJolie|LINK
Hi tikaramk,
Sir, please refer to this infromation in c#;
Request.UserHostAddress
note: In fact, it gets the user language of requesting Browser(ep.Chrome), but if we only want to get the Country, not detail location, i recommend this way Request.UserLanguages because it doesn't rely on 3rd site or tool;
Guides
Welcome to back if any question :)
With regards, Angelina Jolie
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.