How to set UseUserOverride in web.config?

W

Wesley77

I have an ASP.NET web service (.net 3.0) deployed to a foreign web server. We
have encountered a bug where the regional settings of the service account
running at the foreign site contain a decimal separator of "," which breaks
our code where it is trying to parse a string value containing a "."

I cannot push new code to the server right now without going through a
lengthy QC process, but I can update the web.config file. I already have
included <globalization uiCulture="en" culture="en-us"/> in my web config
file, however, since the UseUserOverride setting is true, it still attempts
to use a "," as a decimal separator.

How do I set the UseUserOverride setting to false using just the web.config
file so that it ignore's the regional settings of the account running the web
service, and only uses my defined culture of "en-us" ???

Thanks!
Wesley
 
S

Steven Cheng [MSFT]

Hi Wesley,

Regarding on the Number formatting issue you encountered. I think your
current concern is "code update" is not allowed in a short time and you are
only allowed to do some configuration changes in web.config, correct?

Based on my research, it seems the "UseUserOverride" property is only
settable at the CultureInfo instance or on some other Date/Number
formmating functions(as a input parameter). So far, I think you may
consider the following means:

1. As the document has described, the setting will take effect whenever the
current Culture matches the curent user's regional setting.

================
If UseUserOverride is true and the specified culture matches the current
culture of Windows, the CultureInfo uses those overrides, including user
settings for the properties of the DateTimeFormatInfo instance returned by
the DateTimeFormat property, and the properties of the NumberFormatInfo
instance returned by the NumberFormat property. I
================

Is it possible for you to adjust the regional setting (change the certain
number format for the current region or even switch a different region)?
Also, If you're running windows XP or windows 2003, in the "regional and
languages settings", if you choose "Advanced" tab, there is an option below:

"Apply all settings to the current user account and to the default user
profile"

If that's checked, you can try unchecking it to see whether it helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: (e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response

from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take

approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution.

The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump

analysis issues. Issues of this nature are best handled working with a
dedicated Microsoft Support

Engineer by contacting Microsoft Customer Support Services (CSS) at

http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.




--------------------
 
S

Steven Cheng [MSFT]

Hi Wesley,

How are you doing?

have you got any progress on this issue?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: (e-mail address removed) (Steven Cheng [MSFT])
Organization: Microsoft
Date: Thu, 14 Aug 2008 04:46:38 GMT
Subject: RE: How to set UseUserOverride in web.config?
 
W

Wesley77

I was able to change the regional settings on the server using the method you
described which fixed my problem. However, this was only allowed due to the
fact that the server was loaded with the wrong regional settings to begin
with. This issue may come up as we push to future sites and we may not be
allowed to change the regional settings there, so we are going to make fixes
to support this in the code. Thank you,

Wesley

Steven Cheng said:
Hi Wesley,

How are you doing?

have you got any progress on this issue?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: (e-mail address removed) (Steven Cheng [MSFT])
Organization: Microsoft
Date: Thu, 14 Aug 2008 04:46:38 GMT
Subject: RE: How to set UseUserOverride in web.config?
Hi Wesley,

Regarding on the Number formatting issue you encountered. I think your
current concern is "code update" is not allowed in a short time and you are
only allowed to do some configuration changes in web.config, correct?

Based on my research, it seems the "UseUserOverride" property is only
settable at the CultureInfo instance or on some other Date/Number
formmating functions(as a input parameter). So far, I think you may
consider the following means:

1. As the document has described, the setting will take effect whenever the
current Culture matches the curent user's regional setting.

================
If UseUserOverride is true and the specified culture matches the current
culture of Windows, the CultureInfo uses those overrides, including user
settings for the properties of the DateTimeFormatInfo instance returned by
the DateTimeFormat property, and the properties of the NumberFormatInfo
instance returned by the NumberFormat property. I
================

Is it possible for you to adjust the regional setting (change the certain
number format for the current region or even switch a different region)?
Also, If you're running windows XP or windows 2003, in the "regional and
languages settings", if you choose "Advanced" tab, there is an option below:

"Apply all settings to the current user account and to the default user
profile"

If that's checked, you can try unchecking it to see whether it helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we

can improve the support we provide to you. Please feel free to let my
manager know what you think of

the level of service provided. You can send feedback directly to my manager
at: (e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to

htt
 
S

Steven Cheng [MSFT]

Thanks for your followup Wesley,

Yes, fixing it via code is the recommended approach and that will make the
culture behavior fully consistent to the .net framework's setting instead
of depending on the windows regional settings/customization.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: =?Utf-8?B?V2VzbGV5Nzc=?= <[email protected]>
References: <[email protected]>
Subject: RE: How to set UseUserOverride in web.config?
Date: Mon, 18 Aug 2008 08:34:01 -0700
I was able to change the regional settings on the server using the method you
described which fixed my problem. However, this was only allowed due to the
fact that the server was loaded with the wrong regional settings to begin
with. This issue may come up as we push to future sites and we may not be
allowed to change the regional settings there, so we are going to make fixes
to support this in the code. Thank you,

Wesley

Steven Cheng said:
Hi Wesley,

How are you doing?

have you got any progress on this issue?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: (e-mail address removed) (Steven Cheng [MSFT])
Organization: Microsoft
Date: Thu, 14 Aug 2008 04:46:38 GMT
Subject: RE: How to set UseUserOverride in web.config?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top