DataProtectionBuilderExtensions.PersistKeysToFileSystem 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将数据保护系统配置为将密钥保存到指定目录。 此路径可能位于本地计算机上,也可以指向 UNC 共享。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ PersistKeysToFileSystem(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder, System::IO::DirectoryInfo ^ directory);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder PersistKeysToFileSystem (this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.IO.DirectoryInfo directory);
static member PersistKeysToFileSystem : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder * System.IO.DirectoryInfo -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function PersistKeysToFileSystem (builder As IDataProtectionBuilder, directory As DirectoryInfo) As IDataProtectionBuilder
参数
- directory
- DirectoryInfo
要在其中存储密钥的目录。
返回
此操作完成后对 IDataProtectionBuilder 的引用。