I am trying to find the ThreeLetterISORegionName
of country "Cyprus" and "Virgin Islands". hence so I have used RegionInfo
class using System.Globalization
from mscorlib
assembly.
RegionInfo regionInfo = new RegionInfo("CY");
Console.WriteLine(regionInfo.ThreeLetterISORegionName);
The above code works fine in my local machine. however after deploying to production I am getting System.ArgumentException
with message
The region name CY should not correspond to neutral culture; a specific culture name is required
In my local machine and server I am using .net 4.5.2
version.
mscorlibv
assembly version is 4.0.30319
Any help is much appreciated. :)
Later I found the root cause of this problem.
My local machine is Windows 10 which has the updated region info.
where my server OS is
windows server 2008
which doesnt have region information on cyprus or Virgin Islands