Home All Groups Group Topic Archive Search About

dollar sign ($) changed to a strange character

Author
28 Sep 2006 11:51 PM
bhughes10
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 ¤200.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

Author
29 Sep 2006 2:18 PM
Norman Yuan
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.

Show quote
"bhughes10" <bhughe***@discussions.microsoft.com> wrote in message
news:ADB57E03-8AE6-471F-ADB3-C39FA214AD54@microsoft.com...
>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 ¤200.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
>
Author
29 Sep 2006 3:34 PM
Carl Daniel [VC++ MVP]
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
Author
4 Oct 2006 11:43 AM
bhughes10
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.


Show quote
"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
>
>
>

AddThis Social Bookmark Button