Question

I'm having trouble with CultureInfo in our ASP.NET web application. Our web application returns a different culture, depending on which application pool it is in.

In application pool A, it is en-US, but in application pool B, it's nl-BE.

I'd like it to be nl-BE, but can't find where to change this (IIS6 by the way). I'm not even sure if this can be changed on an app-pool level.

I'm checking with CultureInfo.CurrentCulture.Name.

Is it possible to change this for an application pool? Or what else could influence this? In the regional settings of the server, we have selected 'Dutch (Belgium)', which translates to nl-BE, I believe. So where could this application pool be getting the en-US?

Was it helpful?

Solution

Yes, it can be different. It's a per-thread property. You can set CurrentCulture for each thread separately.

Are you sure you are not altering the setting somewhere in code? Is <globalization> setting identical for both tests?

If you want to force a specific culture, try something like:

<globalization culture="en-US" uiCulture="en-US" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top