Fix Mud Dialog Issues in Blazor Server
Technology

Fix Mud Dialog Issues in Blazor Server

Br Re

October 05, 2025

244 views

#mud blazor#blazor server#dialog issues#.net 9#cascading authentication

Mud Dialog Not Appearing in Blazor Server .Net 9 Site

While implementing Mud Blazor on this site, I encountered several issues trying to display a simple Mud Dialog. Despite following all the guidance provided in the Mud Blazor Dialog examples, nothing seemed to work.

Eventually, I made one crucial adjustment: I moved the <MudDialogProvider> into the component I was working with. This change enabled the Dialog to function, but it still didn't feel quite right. All the Mud Blazor documentation and examples suggest placing the <MudDialogProvider> within the MainLayout.

After some investigation, I discovered that the root of the problem originated from the configuration of the Blazor site. In my App.razor file, the CascadingAuthenticationState was incorrectly wrapped around the Routes tag. Since .NET 9 uses Dependency Injection for CascadingAuthenticationState, it should not encompass the Routes tag.  

Change:

<CascadingAuthenticationState>
    <Routes />
</CascadingAuthenticationState>

To:

<Routes @rendermode="InteractiveServer" />


After making this change, the Mud Dialogs worked perfectly.

Comments (0)
Add a Comment
Search
Search posts...
An unhandled error has occurred. Reload 🗙