Update index.md for blazor server security (#29184)

pull/29171/head
Yue Cui 2023-05-05 20:19:02 +08:00 committed by GitHub
parent 821e8ee4a4
commit e6aadfc29d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -340,7 +340,7 @@ public class AuthenticationService
In `Program.cs`, register the `AuthenticationService` in the dependency injection container:
```csharp
builder.Services.AddSingleton<AuthenticationService>();
builder.Services.AddScoped<AuthenticationService>();
```
:::moniker-end
@ -350,7 +350,7 @@ builder.Services.AddSingleton<AuthenticationService>();
In `Startup.ConfigureServices` of `Startup.cs`, register the `AuthenticationService` in the dependency injection container:
```csharp
services.AddSingleton<AuthenticationService>();
services.AddScoped<AuthenticationService>();
```
:::moniker-end