如何在 IIS 6.0 中设置正确的小数点分隔符?
我希望你能在这里帮助我...我与主机的专用服务器上的小数分隔符有冲突。 DB (SQL SERVER 2005) 使用点作为小数点分隔符。事实上,如果您直接使用 SQL Server Management 查询它,您会得到点。但是,当应用程序 (.NET C# MVC 2) 运行时,它使用逗号而不是点。我认为这是服务器上的问题,因为在测试服务器中它不会发生。
我一直在阅读它可能与区域和时区配置有关,但我已经尝试将服务器的时区和区域设置为美国,但它仍然不起作用。
我遇到的主要问题是因为所有使用 jquery 的视图都无法正常工作,而且主要问题是因为许多十进制数字被设置为必填字段。重新编程是一种选择,但由于应用程序的大小,我希望找到正确设置所有内容的方法。
任何帮助将非常感激。
预先感谢,
问候。
I hope you can help me here... I have a conflict with the decimal separator on my host's dedicated server. The DB (SQL SERVER 2005) uses dot as decimal separator. As a fact, if you query it directly using SQL Server Management you would get dots. However, when the application (.NET C# MVC 2) is running it uses comma instead of dot. I think it's a problem on the server because here in the tests server it doesn't happen.
I've been reading it might be related to regional and time zone configuration but I've already tried setting the server's time zone and regional zone to the U.S. and it still doesn't work.
The main problem for this that I have is because all views which use jquery are not working correctly, and the main issue is because many decimal numbers are set as required fields. Reprogramming it all is an option but I expect to find the way to set everything up correctly due to the size of the app.
Any help will be VERY apprecciated.
Thanks in advance,
Regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
区域设置是用户特定的。这意味着在控制面板中更改它们会导致当前用户更改它们。但您的应用程序不使用当前用户,因此您需要运行 regedit 来修改注册表(或使用脚本)。
您需要更新运行应用程序的配置文件的区域设置。
小数点分隔符的 键 是
HKEY_USERS\SID\Control Panel\International\iCurrDigits
,其中 SID 是用户的唯一标识符。通过此链接,您可以找到相关用户的SID 。
Regional settings are user specific. This means changing them in control panel results in changing them for the current user. But your application does not use the current user, so you need to run regedit to modify the registry (or use a script).
You need to update the regional settings of the profile running your application.
The key for decimal separator is
HKEY_USERS\SID\Control Panel\International\iCurrDigits
where SID is the unique identifier of the user.With this link you can find the SID of the related user.