Microsoft KB Archive/939949

= 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: &quot;Culture name 'Culture' is not supported&quot; =

Article ID: 939949

Article Last Modified on 12/3/2007

-

APPLIES TO


 * Microsoft .NET Framework 2.0

-



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 &quot;Symptoms&quot; 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:



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.  Create an application that can be used to build a custom culture. To do this, follow these steps:  Click Start, click Run, type notepad, and then click OK.  Paste the following code into Notepad. using System; using System.Globalization;

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

}

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(&quot;Aliased culture {0} has parent of {1}.&quot;, ci, ci.Parent); ci = new CultureInfo(strRealName); Console.WriteLine(&quot;\&quot;Real\&quot; culture {0} has parent of {1}.&quot;, ci, ci.Parent); }       catch (Exception e)        { Console.WriteLine(&quot;Unable to create custom culture &quot; + 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.  On the File menu, click Save As. 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. Exit Notepad.</ol> </li> Run the application that you created in step 1 to build a custom culture. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Click Start, click Run, type cmd, and then click OK.</li> Type cd &quot;My Documents&quot;, and then press ENTER</li> Type %windir%\Microsoft.NET\Framework\v2.0.50727\csc /r: sysglobl.dll MakeCultures.cs, and then press ENTER.</li> Type MakeCultures.exe to run the program to build the culture.</li></ol> </li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: patch 6847 update 928365 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 MSRC

Keywords: kbbug kbfix kbsecvulnerability kbqfe kbsecurity kbsecbulletin kbpubtypekc kbexpertiseadvanced KB939949

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.