共用方式為


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 參考。

適用於