From e6aadfc29d9286ec0b29f9a7f0356b27fa29d850 Mon Sep 17 00:00:00 2001 From: Yue Cui <37979368+LuohuaRain@users.noreply.github.com> Date: Fri, 5 May 2023 20:19:02 +0800 Subject: [PATCH] Update index.md for blazor server security (#29184) --- aspnetcore/blazor/security/server/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/security/server/index.md b/aspnetcore/blazor/security/server/index.md index 4c1a584b23..d0ae62bed1 100644 --- a/aspnetcore/blazor/security/server/index.md +++ b/aspnetcore/blazor/security/server/index.md @@ -340,7 +340,7 @@ public class AuthenticationService In `Program.cs`, register the `AuthenticationService` in the dependency injection container: ```csharp -builder.Services.AddSingleton(); +builder.Services.AddScoped(); ``` :::moniker-end @@ -350,7 +350,7 @@ builder.Services.AddSingleton(); In `Startup.ConfigureServices` of `Startup.cs`, register the `AuthenticationService` in the dependency injection container: ```csharp -services.AddSingleton(); +services.AddScoped(); ``` :::moniker-end