PC Regional and Language Settings are being ignored in .Net

后端 未结 1 1018
小鲜肉
小鲜肉 2021-01-15 06:42

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 fo

相关标签:
1条回答
  • 2021-01-15 06:53

    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.Default\Control Panel\International`.

    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.

    0 讨论(0)
提交回复
热议问题