7.0的启动时看到这个输出:
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using 'C:\Users\geffzhang\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: C:\Users\geffzhang\Downloads\sscms-7.0.0-preview1-win-x64
默认情况下Data Protection会生成 xml 文件用来存储session或者是状态的密钥文件。这些文件用来加密或者解密session等状态数据。
这个只支持单机环境,如果是集群环境下这个是有问题,在集群环境下 最简单的方式是通过文件共享、DPAPI或者注册表,也就是说把加密过后的xml文件都存储在相同的地方。
7.0的启动时看到这个输出: info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] User profile is available. Using 'C:\Users\geffzhang\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. info: Microsoft.Hosting.Lifetime[0] Now listening on: http://localhost:5000 info: Microsoft.Hosting.Lifetime[0] Now listening on: https://localhost:5001 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production info: Microsoft.Hosting.Lifetime[0] Content root path: C:\Users\geffzhang\Downloads\sscms-7.0.0-preview1-win-x64
默认情况下Data Protection会生成 xml 文件用来存储session或者是状态的密钥文件。这些文件用来加密或者解密session等状态数据。 这个只支持单机环境,如果是集群环境下这个是有问题,在集群环境下 最简单的方式是通过文件共享、DPAPI或者注册表,也就是说把加密过后的xml文件都存储在相同的地方。