Help! We have a basic razor page app. We would like to add Blazor components. We have no problem getting this to work via replicating
the steps in the 04/16 Blazor Update video or using the Blazor
documentation. However, once we add the
Blazor component to a Razor page, all of our asp-page links no longer work. The url changes in the address bar, but we remain
on the same page. The startup file is as
follows:
public void ConfigureServices(IServiceCollection services)
{
services.Configure<CookiePolicyOptions>(options =>
{
options.CheckConsentNeeded =
context => true;
});
services.AddRazorPages()
.AddNewtonsoftJson();
services.AddServerSideBlazor();
}
public void
Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseCookiePolicy();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
endpoints.MapBlazorHub();
});
}
If some
one can point me to a multi page tutorial with Razor Pages and Blazor
Components, I’m sure we can figure this out! Thanks in advance!