I know I’m not alone in this, but I’m yet to find a solution.
My PC Regional and Language settings are all English (United Kingdom) but .Net is using US formats for dates and currencies.
I’ve checked the machine config and web config and there are no globalization settings and I don’t want to add them.
Is there another setting somewhere I’ve missed?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You use the ASP.NET tag: I suspect you are running the application under an identity without its own profile, and it is using the default regional settings stored in the registry under ‘HKEY_USERS.DefaultControl PanelInternational`.
These aren’t necessarily the same as the regional settings of an interactive user.
You can do one of two things:
-
Add a
<globalization>element to your web.config. This is probably the best solution, as it makes your app independent of the regional settings of the hosting server. - Use Control Panel to set the regional settings you want for the current user and for the default user profile. The exact steps depend on the Windows version you’re using.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0