共用方式為


DataProtectionBuilderExtensions.DisableAutomaticKeyGeneration 方法

定義

設定資料保護系統,不要自動產生新的金鑰。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ DisableAutomaticKeyGeneration(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder DisableAutomaticKeyGeneration (this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder);
static member DisableAutomaticKeyGeneration : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function DisableAutomaticKeyGeneration (builder As IDataProtectionBuilder) As IDataProtectionBuilder

參數

傳回

此作業完成之後的 IDataProtectionBuilder 參考。

備註

呼叫此 API 會對應至設定 AutoGenerateKeys 為 'false'。 如需詳細資訊,請參閱該屬性的檔。

適用於