IIS 7 .NET Globalization settings

8,843

Solution 1

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.

Solution 2

You could modify machine config file from C:\WINDOWS\Microsoft.NET\Framework(64 or 32)\<.net version>\Config and set globalization culture="en-US" uiCulture="en-US" for example.

Share:
8,843

Related videos on Youtube

rem
Author by

rem

Updated on September 17, 2022

Comments

  • rem
    rem over 1 year

    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?