microsoft / fluentui-blazor

Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
https://www.fluentui-blazor.net
MIT License
3.87k stars 376 forks source link

fix: [The FluentDialogProvider component cannot function properly when deployed in Release mode on iis] in [FluentDialogProvider] #1329

Closed sswi closed 10 months ago

sswi commented 10 months ago

🐛 Bug Report

The FluentDialogProvider component cannot function properly when deployed in Release mode on IIS

💻 Repro or Code Sample

<FluentStack>
    <FluentButton OnClick="ShowDialogAsync" Title="Dialog">Success</FluentButton>
    <FluentButton OnClick="ShowMessageBoxAsync" Title="MessageBox">Welcome</FluentButton>
</FluentStack>

<FluentToastProvider />
<FluentDialogProvider />
<FluentTooltipProvider />
<FluentMessageBarProvider />
    [Inject]
    private IDialogService DialogService { get; set; } =default!;

    private async Task ShowDialogAsync()
    {
        var dialogResult = await DialogService.ShowSuccessAsync("Welcome to Dongbei");
    }

    private async Task ShowMessageBoxAsync()
    {
        var messageBoxResult = await DialogService.ShowMessageBoxAsync(new DialogParameters<MessageBoxContent>()
            {                
                Content = new()
                {
                    Title = "Welcome",
                    Message="Welcome to Dongbei",  
                    MarkupMessage = new MarkupString("❤️"),
                    Icon = new Icons.Regular.Size24.Heart(),
                    IconColor = Color.Error,
                },
                PrimaryAction = "OK",                
                Width = "300px",
            });
    }

🤔 Expected Behavior

The dialog box prompt message should be visible

😯 Current Behavior

Debugging mode runs normally

https://github.com/microsoft/fluentui-blazor/assets/39110708/7306a8dc-99ac-447d-99a7-7593fa0450e6

Release mode does not work properly

https://github.com/microsoft/fluentui-blazor/assets/39110708/f07a726b-3f92-4eea-8b68-3936a3079150

💁 Possible Solution

🔦 Context

🌍 Your Environment

.net8.0 blazor web app, auto model,global Microsoft Fluent UI Blazor components 4.3.1

vnbaaij commented 10 months ago

Duplicate of #1255