Update index.md for blazor server security (#29184)
parent
821e8ee4a4
commit
e6aadfc29d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue