radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.52k stars 786 forks source link

Error in ColorPicker after deploy to IIS #1705

Closed lulikin closed 3 weeks ago

lulikin commented 3 weeks ago

There is nothing special. I use RadzenColorPicker in a way <RadzenColorPicker Name="Color" class="w-100" @bind-Value="_StallCode.Color" />

Everything works in debug. But after I deploy my project to IIS, I get flowing error. System.TypeInitializationException: TypeInitialization_Type, Radzen.Blazor.Rendering.RGB ---> System.PlatformNotSupportedException: PlatformNotSupported_HybridGlobalization, HashCode at System.Globalization.CompareInfo.GetHashCodeOfStringCore(ReadOnlySpan1 , CompareOptions ) at System.Globalization.CompareInfo.GetHashCode(ReadOnlySpan1 , CompareOptions ) at System.Globalization.CompareInfo.GetHashCode(String , CompareOptions ) at System.CultureAwareComparer.GetHashCode(String ) at System.Collections.Generic.Dictionary2[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TryInsert(String , String , InsertionBehavior ) at System.Collections.Generic.Dictionary2[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].set_Item(String , String ) at Radzen.Blazor.Rendering.RGB..cctor() Exception_EndOfInnerExceptionStack at Radzen.Blazor.RadzenColorPicker.SetInitialValue() at Radzen.Blazor.RadzenColorPicker.OnInitialized() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Radzen.RadzenComponent.SetParametersAsync(ParameterView parameters) at Radzen.Blazor.RadzenColorPicker.SetParametersAsync(ParameterView parameters) Capture

enchev commented 3 weeks ago

In my opinion this error is caused by wrong .NET version installed on your IIS server - definitely not related to our component . You need to install .NET 8 Windows Hosting Bundle: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-8.0.8-windows-hosting-bundle-installer

lulikin commented 3 weeks ago

Thank you for reply mr. enchev. I think that error has something to do with color parsing and localization. I use many radzen components in this poject (menu, grid, editors, dropdowns,..), but only color component show error. I will try to give you specific line of source in the following week. Gregor