Skip to content

Commit e3e14ee

Browse files
committed
Updates
1 parent cea44aa commit e3e14ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aspnetcore/migration/70-80.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ Blazor Server apps are supported in .NET 8 without any code changes. Use the fol
291291
app.UseAntiforgery();
292292
```
293293

294-
The preceding call to `app.UseAntiforgery` must be placed after calls to `app.UseAuthentication` and `app.UseAuthorization`. There's no need to explicitly add antiforgery services (`builder.Services.AddAntiforgery`), as they're added automatically by <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>, which was added earlier.
294+
The preceding call to `app.UseAntiforgery` must be placed after calls, if present, to `app.UseAuthentication` and `app.UseAuthorization`. There's no need to explicitly add antiforgery services (`builder.Services.AddAntiforgery`), as they're added automatically by <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>, which was added earlier.
295295

296296
1. If the Blazor Server app was configured to disable prerendering, you can continue to disable prerendering for the updated app. In the `App` component, change the value assigned to the `@rendermode` Razor directive attributes for the <xref:Microsoft.AspNetCore.Components.Web.HeadOutlet> and `Routes` components.
297297

@@ -435,7 +435,7 @@ Blazor WebAssembly apps are supported in .NET 8 without any code changes. Use th
435435

436436
Add [Antiforgery Middleware](xref:blazor/security/index#antiforgery-support) to the request processing pipeline.
437437

438-
Place the following line after the call to `app.UseHttpsRedirection`. The call to `app.UseAntiforgery` must be placed after a call to `app.UseAuthorization`, if present. There's no need to add antiforgery services (`builder.Services.AddAntiforgery`), as they're added automatically by <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>, which was covered earlier.
438+
Place the following line after the call to `app.UseHttpsRedirection`. The call to `app.UseAntiforgery` must be placed after calls, if present, to `app.UseAuthentication` and `app.UseAuthorization`, if present. There's no need to add antiforgery services (`builder.Services.AddAntiforgery`), as they're added automatically by <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>, which was covered earlier.
439439

440440
```csharp
441441
app.UseAntiforgery();

0 commit comments

Comments
 (0)