Thread ID: |
Created: |
Platform: |
Replies: |
144300 | Apr 29,2019 04:23 PM UTC | ASP.NET Core - EJ 2 | 0 |
![]() |
Tags: General |
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!
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.