473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Will ASP.NET cache culture setting?

Hi,
We migrated some of web applications to a new server. When the server
was installed, the regional setting was EN-CA, later on we found culture
display was not same as from original server (which was EN-US), we reset
server's culture to EN-US.
Now we have 2 web applications still behaviouring as EN-CA setting. It
recoginizes string "03/01/2003" as Januray 3rd 2003, not March 1st 2003.
I checked code, nothing is wrong. I check regional setting of server
(Windows 2000 Advanced Server), it is "English United States", short format
is "M/d?yyyy". I created a small piece of windows application program to
test on this server, it works fine. Only two web applications do not look
good.

So I am wandering when ASP.NET is installed on machine, will it remember
culture selection at that time? I really think not possible, but the factor
makes to suspect.

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
Nov 19 '05 #1
2 1708
Hi,

My advice is to set the culture explicitly and to stop worrying about what
Windows and .NET Framework believe it should be. In the
Application_BeginRequest handler set the following:

System.Threading.Thread.CurrentThread.CurrentCultu re =
new System.Globalization.CultureInfo("en-US");

(with or without the semi-colon at the end depending on the language you are
using)

Hope this helps
Martin Dechev
ASP.NET MVP
"Hardy Wang" <ha*******@hotmail.com> wrote in message
news:#w**************@TK2MSFTNGP09.phx.gbl...
Hi,
We migrated some of web applications to a new server. When the server
was installed, the regional setting was EN-CA, later on we found culture
display was not same as from original server (which was EN-US), we reset
server's culture to EN-US.
Now we have 2 web applications still behaviouring as EN-CA setting. It
recoginizes string "03/01/2003" as Januray 3rd 2003, not March 1st 2003.
I checked code, nothing is wrong. I check regional setting of server
(Windows 2000 Advanced Server), it is "English United States", short format is "M/d?yyyy". I created a small piece of windows application program to
test on this server, it works fine. Only two web applications do not look
good.

So I am wandering when ASP.NET is installed on machine, will it remember culture selection at that time? I really think not possible, but the factor makes to suspect.

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy


Nov 19 '05 #2
Yes, I would agree with you.

I think set culture and uiCulture of globalization section in web.config
should also work.

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
"Martin Dechev" <de*******@hotmail.com> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi,

My advice is to set the culture explicitly and to stop worrying about what
Windows and .NET Framework believe it should be. In the
Application_BeginRequest handler set the following:

System.Threading.Thread.CurrentThread.CurrentCultu re =
new System.Globalization.CultureInfo("en-US");

(with or without the semi-colon at the end depending on the language you
are
using)

Hope this helps
Martin Dechev
ASP.NET MVP
"Hardy Wang" <ha*******@hotmail.com> wrote in message
news:#w**************@TK2MSFTNGP09.phx.gbl...
Hi,
We migrated some of web applications to a new server. When the server
was installed, the regional setting was EN-CA, later on we found culture
display was not same as from original server (which was EN-US), we reset
server's culture to EN-US.
Now we have 2 web applications still behaviouring as EN-CA setting.
It
recoginizes string "03/01/2003" as Januray 3rd 2003, not March 1st 2003.
I checked code, nothing is wrong. I check regional setting of server
(Windows 2000 Advanced Server), it is "English United States", short

format
is "M/d?yyyy". I created a small piece of windows application program to
test on this server, it works fine. Only two web applications do not look
good.

So I am wandering when ASP.NET is installed on machine, will it

remember
culture selection at that time? I really think not possible, but the

factor
makes to suspect.

--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bite My Bubbles | last post by:
I found the answer! It is a IIS 6 /ASP problem http://support.microsoft.com/default.aspx?scid=kb;en-us;332075
2
by: Nadav | last post by:
Hi, I am new to WebControls, I have created a WebControl that is used to present an image, the image bing presented is created on runtime, each client side button click causes the image to...
0
by: Ashish | last post by:
we recently introduced session state management with state server in our application, but its seems to be having some thread culture problems ... the issue is that the culture of the thread in...
5
by: Tim_Mac | last post by:
hi, i read that by adding the following code to by aspx pages, it would not store temporary internet files: Response.Cache.SetCacheability(HttpCacheability.NoCache); it didn't actually work...
11
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta...
2
by: Lucky | last post by:
hi guys! i've got one interesting problem. one of my utility is generating data machine specific, i mean the data is generated in the culture that the machine has. my problem is with the...
0
by: kidders | last post by:
Seem to be having problems with the en-GB culture/uiCulture setting, its making dates a format of the incorrect MM/dd/yyyy. I've searched the groups on this issue, here is a lengthy thread, where...
0
by: =?Utf-8?B?YmlqYXk=?= | last post by:
The type initializer for 'Microsoft.ApplicationBlocks.Cache.CacheService' threw an exception. We migrated our windows application from 1.1 to 2.0. The debug and Release mode of the application...
1
by: JX | last post by:
if you cache two usercontrols, and both of which contains either a menu or treeview, then the first time you get the response right, but on second reqeust or any later request where the cached...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.