Open Closed

System.Globalization.CultureNotFoundException: Culture is not supported after updating to 8.2.0 #7465


User avatar
0
Sturla created

I have followed the migration guide on this but am totally unable to fix it..

Any change there is something missing I need to do? This happens so early starting up I can´t get any more detailed information about where it could be happening. I even tried removing everything Icelandic (is or is-IS) and just have 'en' but still an issue..

[12:54:37 DBG] HealthReportCollector - health report execution history saved.
[12:54:37 DBG] HealthReport history already exists and is in the same state, updating the values.
[12:54:37 DBG] HealthReportCollector has completed.
[12:54:37 DBG] HealthCheck collector HostedService executed successfully.
[12:54:41 DBG] Starting HttpMessageHandler cleanup cycle with 3 items
[12:54:41 DBG] Ending HttpMessageHandler cleanup cycle after 0.0553ms - processed: 0 items - remaining: 3 items
[12:54:41 INF] Request starting HTTP/2 GET https://localhost:44307/api/abp/application-configuration?IncludeLocalizationResources=False - null null
[12:54:41 ERR] An unhandled exception has occurred while executing the request.
System.Globalization.CultureNotFoundException: Culture is not supported. (Parameter 'name')
Icelandic is an invalid culture identifier.
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync()
   at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
[12:54:41 DBG] Response markup is scheduled to include Browser Link script injection.
[12:54:41 DBG] Response markup is scheduled to include browser refresh script injection.
[12:54:41 DBG] Response markup was updated to include Browser Link script injection.
[12:54:41 DBG] Response markup was updated to include browser refresh script injection.
[12:54:41 INF] Request finished HTTP/2 GET https://localhost:44307/api/abp/application-configuration?IncludeLocalizationResources=False - 500 null text/html; charset=utf-8 11.4419ms
[12:54:41 INF] Request starting HTTP/2 GET https://localhost:44307/_vs/browserLink - null null
[12:54:41 INF] Request starting HTTP/2 GET https://localhost:44307/_framework/aspnetcore-browser-refresh.js - null null
[12:54:41 INF] Request finished HTTP/2 GET https://localhost:44307/_framework/aspnetcore-browser-refresh.js - 200 13770 application/javascript; charset=utf-8 1.4353ms
[12:54:41 INF] Request finished HTTP/2 GET https://localhost:44307/_vs/browserLink - 200 null text/javascript; charset=UTF-8 15.2492ms
[12:54:41 INF] Request starting HTTP/2 GET https://localhost:44307/favicon.ico - null null

  • ABP Framework version: v8.2.0, Lepton Theme
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

4 Answer(s)
  • User Avatar
    0
    Sturla created

    I figured this out!

    There are still the wrong values in the AbpLanguages table!

    This should be in the migration information and handled somehow. Maybe I missed it in earlier versions?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The Icelandic doesn't exist in the template project.

    Did you add it manually?

  • User Avatar
    0
    Sturla created

    Not the commercial version but it does in the open source and I added it to my commercial product 2 years ago so you should accomondate for this also.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    In my computer:

    var Icelandic = new CultureInfo("Icelandic");
    Console.WriteLine(Icelandic.DisplayName);
    
    Console.WriteLine("------------------");
    
    var Iceland = new CultureInfo("Icelandic (Iceland)");
    Console.WriteLine(Iceland.DisplayName);
    

    Icelandic (Iceland) is an invalid culture identifier.

    icelandic
    
    ------------------
    
    Unhandled exception. System.Globalization.CultureNotFoundException: Culture is not supported. (Parameter 'name')
    Icelandic (Iceland) is an invalid culture identifier.
       at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
       at Program.<Main>$(String[] args) in /Users/maliming/RiderProjects/ConsoleApp5/ConsoleApp5/Program.cs:line 10
    
    
Made with ❤️ on ABP v9.0.0-preview Updated on September 18, 2024, 12:46