Friday, August 10, 2007

Forum post about asp.net locales

From bhughes10 on 9/28/2006 4:51:02 PM
I saw a question from Norman Yuan several months back with the same problem I'm having now. Never saw an answer.My currency that should be displayed as $200.00 is displayed as A200.00 randomly when my production server is under load. It doesn't happen on the dev computers. An IIS reset temp fixes it but soon returns. I'm running ASP.NET app, .NET 1.1, developed on VS.NET2003. Windows Server 2003 Std. with latest SP, IIS6.0


From bhughes10 on 10/4/2006 4:43:01 AM
It's been 2 days with heavy loads on my server and no problems. I took your suggestion and created a new application pool for the site. Thanks Carl.
"Carl Daniel [VC++ MVP]" wrote:
> Norman Yuan wrote:
> > Still no solution here. Originally, I though it could have something
> > to do with our incapable server (PIII700Hz, 512MB, running Win2003
> > IIS6 and SQL Server2000 on the same box). But after upgrading to a
> > brand new, powerful server, the problem is still there. The $ sign
> > randomly changed, but not alway on the same web page. That is,
> > browsing the same page with different query string parameters, the $
> > sign sometimes is OK, sometimes is not.
> > Very frustrated with no cause found.
>
> This is caused by something running on a threadpool thread that changed the
> default locale. We ran into this issue with an ASP.NET application as well
> and through trial and error identified another ASP.NET application running
> in the same app pool that was changing the locale to German for some reason.
>
> There are two approaches you can take that might help:
>
> 1. Explicitly specify your intended locale (i.e. IFormatProvider) every
> where you convert numbers to strings.
> 2. Separate all applications into their own completely isolated application
> pools to keep locale changes from one application from "leaking" into
> another.
>
> -cd

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.