I have a very basic Blazor WASM app targeting .NET 8 hosted on Azure Static Web Apps.
I just added a very simple page -- see below. I can just go direct to the URL locally and it works fine but on Azure Static Web App service, I get the following page not found error -- see below. What's interesting is that this is not the page not found error that my app should generate.
Here's the Azure page not found error:
My simple page looks like this:
@page "/privacy"<h3>Privacy Policy</h3><div><p>Some text about privacy policy</p><p>More text about privacy policy</p></div>My app uses Azure AD B2C for user management and the privacy page I just added should be available to public i.e. anonymous users as well as authenticated users.
This is what my App.razor looks like:
<CascadingAuthenticationState><Router AppAssembly="@typeof(App).Assembly"><Found Context="routeData"><AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"><NotAuthorized> @if (context.User.Identity?.IsAuthenticated != true) {<RedirectToLogin /> } else {<p role="alert">You are not authorized to access this resource.</p> }</NotAuthorized></AuthorizeRouteView><FocusOnNavigate RouteData="@routeData" Selector="h1" /></Found><NotFound><PageTitle>Not found</PageTitle><LayoutView Layout="@typeof(MainLayout)"><p role="alert">Sorry, there's nothing at this address.</p></LayoutView></NotFound></Router></CascadingAuthenticationState>Any idea what could be the issue here?
