使用 Microsoft 登录
登录或创建帐户。
你好,
使用其他帐户。
你有多个帐户
选择要登录的帐户。
英文
很抱歉。本文没有你的语言版本。

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.

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 name

New culture name

az-AZ-Latn

az-Latn-AZ

uz-UZ-Latn

uz-Latn-UZ

sr-SP-Latn

sr-Latn-CS

az-AZ-Cyrl

az-Cyrl-AZ

uz-UZ-Cyrl

uz-Cyrl-UZ

sr-SP-Cyrl

sr-Cyrl-CS

bs-BA-Cyrl

bs-Cyrl-BA

sr-BA-Latn

sr-Latn-BA

sr-BA-Cyrl

sr-Cyrl-BA

bs-BA-Latn

bs-Latn-BA

iu-CA-Latn

iu-Latn-CA

div-MV

dv-MV

en-CB

en-029

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.

Status

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

需要更多帮助?

需要更多选项?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

此信息是否有帮助?

哪些因素影响了你的体验?
按“提交”即表示你的反馈将用于改进 Microsoft 产品和服务。 你的 IT 管理员将能够收集此数据。 隐私声明。

谢谢您的反馈!

×