DataProtectionBuilderExtensions.PersistKeysToFileSystem 方法

定义

将数据保护系统配置为将密钥保存到指定目录。 此路径可能位于本地计算机上,也可以指向 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 的引用。

适用于