aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Support navigation during prerendering

Open sbuchok opened this issue 7 years ago • 2 comments

OnInit of a page, I check to see if the user is logged in. If they are not, I use IUriHelper to redirect to the login page. Right now, there is an error when I try do this:

"Navigation is not allowed during prerendering"

After the error, it does indeed navigate to the login page.

Not sure if it is related to this bug: https://github.com/aspnet/AspNetCore/issues/8422

Sounds like it could be similar.

sbuchok avatar Mar 17 '19 01:03 sbuchok

Thanks for contacting us, @sbuchok. We will try to add an ability of navigating while prerendering on the server side. A component which requires authorization and redirects if not authorized is one example.

mkArtakMSFT avatar Mar 26 '19 16:03 mkArtakMSFT

No no, thank you. BTW, I'm loving working with Blazor/Razor Components so far. You guys are doing awesome.

sbuchok avatar Mar 26 '19 17:03 sbuchok