We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ac961e commit da50e67Copy full SHA for da50e67
src/BootstrapBlazor.Server/Extensions/ServiceCollectionSharedExtensions.cs
@@ -4,6 +4,7 @@
4
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
5
6
using Microsoft.AspNetCore.Components.Authorization;
7
+using Microsoft.AspNetCore.DataProtection;
8
9
namespace Microsoft.Extensions.DependencyInjection;
10
@@ -98,7 +99,9 @@ public static IServiceCollection AddBootstrapBlazorServices(this IServiceCollect
98
99
services.AddBootstrapBlazorRegionService();
100
101
// 增加密钥存储配置
- services.AddDataProtection();
102
+ services.AddDataProtection()
103
+ .SetApplicationName("BootstrapBlazor")
104
+ .PersistKeysToFileSystem(new DirectoryInfo(Path.Combine(AppContext.BaseDirectory, "keys")));
105
106
// 增加 PetaPoco ORM 数据服务操作类
107
// 需要时打开下面代码
0 commit comments