Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message when you run an application or try to access a Web site on a computer that has a particular .NET Framework 2.0 software update installed: "Culture name 'Culture' is not supported"


Symptoms

On a computer that has Microsoft Windows Server 2003 installed, you install the Microsoft .NET Framework 2.0 software update that is described in the following article in the Microsoft Knowledge Base:
928365 Description of the security update for the .NET Framework 2.0 for Windows Server 2003, Windows XP, and Windows 2000: July 10, 2007

When you run an application or try to access a Web site on the computer, you may receive the following error message:
[System.ArgumentException] : Culture name 'Culture' is not supported for the following 13 cultures: en-CB az-AZ-Latn uz-UZ-Latn sr-SP-Latn az-AZ-Cyrl uz-UZ-Cyrl sr-SP-Cyrl bs-BA-Cyrl sr-BA-Latn sr-BA-Cyrl bs-BA-Latn iu-CA-Latn div-MV
Additionally, if an application has resources that use the old culture name format, and if the user's culture name uses the new culture name format, the application cannot find resources for the old culture name format.

↑ Back to the top


Cause

The software update that is mentioned in the "Symptoms" section is a cumulative update for the .NET Framework 2.0. This update includes changes to the culture names. The new culture names follow the syntax of the IETF standards (RFC 4646 and RFC 4647). The changes to the culture names improve interoperability by making sure that each locale has a consistent identifier.

The mappings of the old culture names to the new culture names are as follows:
Old culture nameNew culture name
az-AZ-Latnaz-Latn-AZ
uz-UZ-Latnuz-Latn-UZ
sr-SP-Latnsr-Latn-CS
az-AZ-Cyrlaz-Cyrl-AZ
uz-UZ-Cyrluz-Cyrl-UZ
sr-SP-Cyrlsr-Cyrl-CS
bs-BA-Cyrlbs-Cyrl-BA
sr-BA-Latnsr-Latn-BA
sr-BA-Cyrlsr-Cyrl-BA
bs-BA-Latnbs-Latn-BA
iu-CA-Latniu-Latn-CA
div-MVdv-MV
en-CBen-029

↑ Back to the top


Workaround

To work around this problem, build custom cultures from the new locales that use the old culture names. To do this, follow these steps.

Note You must have the .NET Framework 2.0 installed to use the sample program that is provided here.
  1. Create an application that can be used to build a custom culture. To do this, follow these steps:
    1. Click Start, click Run, type notepad, and then click OK.
    2. Paste the following code into Notepad.
      using System;
      using System.Globalization;

      public class MakeCultures
      {
      static void Main()
      {
      CreateCopyCulture("en-029", "en-CB");
      CreateCopyCulture("az-Latn-AZ", "az-AZ-Latn");
      CreateCopyCulture("uz-Latn-UZ", "uz-UZ-Latn");
      CreateCopyCulture("sr-Latn-CS", "sr-SP-Latn");
      CreateCopyCulture("az-Cyrl-AZ", "az-AZ-Cyrl");
      CreateCopyCulture("uz-Cyrl-UZ", "uz-UZ-Cyrl");
      CreateCopyCulture("sr-Cyrl-CS", "sr-SP-Cyrl");
      CreateCopyCulture("bs-Cyrl-BA", "bs-BA-Cyrl");
      CreateCopyCulture("sr-Latn-BA", "sr-BA-Latn");
      CreateCopyCulture("sr-Cyrl-BA", "sr-BA-Cyrl");
      CreateCopyCulture("bs-Latn-BA", "bs-BA-Latn");
      CreateCopyCulture("iu-Latn-CA", "iu-CA-Latn");
      CreateCopyCulture("dv-MV", "div-MV");


      }

      static void CreateCopyCulture(string strRealName, string strAliasName)
      {
      try
      {
      // Create a new culture based on the old name
      CultureAndRegionInfoBuilder carib = new CultureAndRegionInfoBuilder(
      strAliasName, CultureAndRegionModifiers.None);

      carib.LoadDataFromCultureInfo(new CultureInfo(strRealName));
      carib.LoadDataFromRegionInfo(new RegionInfo(strRealName));

      carib.Register();

      // Change the existing culture's parent to the old culture
      carib = new CultureAndRegionInfoBuilder(strRealName,
      CultureAndRegionModifiers.Replacement);

      carib.Parent = new CultureInfo(strAliasName);
      carib.Register();

      // Verify they're registered...
      CultureInfo ci = new CultureInfo(strAliasName);
      Console.WriteLine("Aliased culture {0} has parent of {1}.", ci, ci.Parent);
      ci = new CultureInfo(strRealName);
      Console.WriteLine("\"Real\" culture {0} has parent of {1}.", ci, ci.Parent);
      }
      catch (Exception e)
      {
      Console.WriteLine("Unable to create custom culture " + strAliasName);
      Console.WriteLine(e);
      }
      }
      }
      Note This sample program sets the parents of the new cultures to the old cultures. The parents of the old cultures cannot be the new cultures at the same time, because this situation would cause infinite recursion during resource look-up.

    3. On the File menu, click Save As.
    4. In the Save As dialog box, click My Document, type MakeCultures.cs in the File name box, click All Files in the Save as type box, and then click Save.
    5. Exit Notepad.
  2. Run the application that you created in step 1 to build a custom culture. To do this, follow these steps:
    1. Click Start, click Run, type cmd, and then click OK.
    2. Type cd "My Documents", and then press ENTER
    3. Type %windir%\Microsoft.NET\Framework\v2.0.50727\csc /r: sysglobl.dll MakeCultures.cs, and then press ENTER.
    4. Type MakeCultures.exe to run the program to build the culture.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbmustloc, kbexpertiseadvanced, kblangall, kbqfe, kbsecurity, kbsecbulletin, kbsecvulnerability, kbbug, kbfix, kbpubtypekc, kb

↑ Back to the top

Article Info
Article ID : 939949
Revision : 4
Created on : 4/17/2018
Published on : 4/17/2018
Exists online : False
Views : 180