System.Globalization.CultureNotFoundException: Culture is not supported

e.genita
Member since: 2012
 

Hi,

I'm upgrading my CMS from version 6r2 to version 7 and while trying to access to my site CMS UI, I encounted the error below.

Culture is not supported.
Parameter name: name
DK is an invalid culture identifier.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Globalization.CultureNotFoundException: Culture is not supported.
Parameter name: name
DK is an invalid culture identifier.

Stack Trace:

 

[CultureNotFoundException: Culture is not supported.
Parameter name: name
DK is an invalid culture identifier.]
   System.Globalization.CultureInfo.GetCultureInfo(String name) +9658314
   EPiServer.Framework.Localization.XmlResources.<get_AvailableLanguages>d__0.MoveNext() +140
   EPiServer.Framework.Localization.ProviderBasedLocalizationService.get_AvailableLocalizations() +240
   EPiServer.Globalization.UserInterfaceLanguage.DetermineCulture(LanguagePreferenceList languagePreference) +134
   EPiServer.Globalization.UserInterfaceLanguage.SetCulture(String priorityLanguage) +27
   EPiServer.UI.SystemPageBase.InitializeCulture() +53
   ASP.util_login_aspx.__BuildControlTree(util_login_aspx __ctrl) in C:\egenita\web apps\e-man\WebUI\Util\Login.aspx:1
   ASP.util_login_aspx.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\25d93bb2\68d679cb\App_Web_am2fskhc.1.cs:0
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +54
   System.Web.UI.Page.ProcessRequest() +78
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.util_login_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\25d93bb2\68d679cb\App_Web_am2fskhc.1.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


 

#64221 Dec 13, 2012 12:13
  • Per Gunsarfs
    Member since: 2005
     

    Hi

    I think the problem because there is a faulty language code for Danish in your sites language files (the *.xml files containing translations). In older versions of the CMS we used DK in the language files, but the correct one is DA. That has been fixed for later versions. However, we do not change the sites language files during upgrade. 

    EPiServer 7 requires that the language definition in the language files are can be parsed to .NET cultures, while earlier versions were more leniant.

    To work around this you should be able to just update your language files, changing <language id="DK"...> to <language id="DA"...>.

    Regards

    Per Gunsarfs

    #64227 Dec 13, 2012 16:00