I want to know where my application is used.
Here is the code for getting the country name and Time zone :
TimeZone localZone = TimeZone.CurrentTimeZone;
var result = localZone.StandardName;
var s = result.Split(' ');
Console.WriteLine(s[0]);
Console.WriteLine(RegionInfo.CurrentRegion.DisplayName);
But my issue is, any one can change the time zone. Based on the time zone I may get wrong name. And the region settings is used as united states which cannot be changed. Because all the users has same settings and there are hundreds of thousands of users to my application.
Is there any way to read any OS settings/ System settings and get the current country where my application is being used?
You can use IpInfo to get a user's country by their internet address. unless they're under VPN or Proxy this is your best bet.
Notice net framework 4.5 or above is required to be able to convert json to object without 3rd party libraries.
if you target lower frameworks, you can parse the info string for yourself.
You can use IP address to get location, there are many options to do it, and one of them is ipinfodb, you can get example from here - Class CountryIP VB/C#