IIS 7 .NET Globalization settings

iisiis-7windows-server-2008windows-server-2008-r2

For an ASP.NET MVC app I need to set my local culture settings in IIS 7 .NET Globalization.
The problem is that these settings (Culture and UI Culture) periodically keep resetting back to default ones: Invariant Language (Invariant Country).

I suspect (though not sure) that this is somehow connected with Application Pool Recycling.

How could I fix that problem?

Best Answer

Yay! My first contribution!

I've been having this problem for a few weeks...

I'm working on a migration projet : - .Net 1.1 -> 4.0 - IIS6 -> IIS7, etc.

The problem was that in a specific case numbers were multiplied by 1000. By setting the site .Net Globalization parameters to "fr-FR" (we're in France) the problem was sold... for a few days. Except the problem came back randomly... or so I thought.

Actually by doing so, IIS created a web.config file at the root of the site and from times to times I was deleting this file, because it shouldn't be there... Why? Because the application wasn deploying in a separate directory within the site's directory.

The web.confing was saying this :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <globalization culture="fr-FR" uiCulture="fr-FR" />
    </system.web>
</configuration>

And then all became clear : this should be written in the web.config of the application.

Actually, I'm testing the solution, but it seems to be on the right track.