Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8108255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:03:19+00:00 2026-06-06T01:03:19+00:00

I have just migrated around 100 ASP.net sites from IIS 6 on Windows Sever

  • 0

I have just migrated around 100 ASP.net sites from IIS 6 on Windows Sever 2003 to IIS 7 on Windows 2008. I’ve just noticed that various pieces of code that use things like DateTime.Parse have started kicking up errors “String was not recognized as a valid DateTime”. I’ve tracked this down to the fact that the CurrentCulture of the sites is defaulting to ‘en-US’ and so my UK users are inputting dates in an unexpected format.

Question is, where are they getting en-US from? Starting from the top, if I look in ‘Control Panel > Region and Language’ everything is set to English (United Kingdom). The web.configs of the sites either don’t have a <globalization> section or have it set as <globalization culture=”auto” uiCulture=”auto” />. In ‘IIS7 – .Net Globalization’ all of the sites have their culture set to ‘Invariant Language (Invariant Country)’.

I can’t find anywhere that’s settings the culture to ‘en-US’… but something is.

Thread.CurrentThread.CurrentCulture.Name is outputting 'en-US'
Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol is outputting '$'

I can fix the issue by adding <globalization culture=”en-GB” uiCulture=”en-GB” /> to every web.config BUT I really don’t want to have to hand edit about 100 web.configs! I wan’t it to inherit the culture from the server OS settings, which are set to en-GB.

Am I missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:03:20+00:00Added an answer on June 6, 2026 at 1:03 am

    These are alternative places where you could search:

    I can’t find anywhere that’s settings the culture to ‘en-US’… but something is.

    Thread.CurrentThread.CurrentCulture.Name is outputting ‘en-US’
    Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol is outputting ‘$’

    Try looking for the InitializeCulture method, this method is overridden in ASP.Net pages to set the Culture like:

    protected override void InitializeCulture()
    {
        var hidden = this.Request.Form["hidden"];
        var culture = this.Request.Form[hidden];
        if (!string.IsNullOrWhiteSpace(culture))
        {
            this.Culture = culture;
            this.UICulture = culture;
        }
    
        base.InitializeCulture();
    }
    

    Try to look for the following assembly attributes:

        [assembly: AssemblyCulture("en-US")]
        [assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.MainAssembly)]
    

    Try to look for the following page directive attributes:

        <%@ Page Culture="en-US" UICulture="en-US" Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
    

    Try to look in web.configs:

    <globalization uiCulture="en-US" culture="en-US" enableClientBasedCulture="false" />
    

    Edit 1

    Try to look for HttpHandlers or HttpModules trying to set the language

    Try to look in the web.config hierarchy (at the server, <wwwroot> means the root folder of your IIS Web Site)

    1. Global machine. <windir>\Microsoft.NET\Framework\<ver>\Config\Machine.config
    2. Root Web config. <windir>\Microsoft.NET\Framework\<ver>\Config\Web.config
    3. Website. <wwwroot>\Web.config
    4. Web application. <wwwroot>\<webapp>\Web.config
    5. Folder. <wwwroot>\<webapp>\<dir>\Web.config

    If you have multiple servers (web farm), check you are being redirected to the correct server (the one you are checking the configuration), in order to do it you can use the ip of the desired server or configure your host files in your client computer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just migrated from Windows to Mac OS X and have found theres no
We just migrated from the older ASP.NET membership (from MVC3) to the new ASP.NET
i have as asp.net-mvc website and we are migrated a popup from using PartialView()
Does anyone have experience with companies that have migrated from classic Asp to .Net
I have just upgraded our company's domain controller from NT 4.0 to Windows 2008
We have just migrated from solr3.5 to solr3.6, for all this time we have
I have just migrated a website from iis6 / WinServer 2k3 to IIS7 /
We just migrated from MYSQL to Oracle 11g and I have to change some
I just migrated my app from cakephp1.3 to cakephp2.0. I have problem configuring session
I've just migrated from SQL2000 to SQL2008 and I have started getting an execute

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.