DSACryptoServiceProvider.UseMachineKeyStore 屬性

定義

取得或設定值,表示是否應該將金鑰保存在電腦的金鑰存放區中,而非使用者設定檔存放區。

public:
 static property bool UseMachineKeyStore { bool get(); void set(bool value); };
public static bool UseMachineKeyStore { get; set; }
static member UseMachineKeyStore : bool with get, set
Public Shared Property UseMachineKeyStore As Boolean

屬性值

如果金鑰應保留在電腦金鑰存放區中,則為 true;否則為 false

備註

將此屬性設定為 true 相當於將 UseMachineKeyStore 旗標傳遞至 CspParameters 物件。 屬性 UseMachineKeyStore 會套用至目前應用程式域中的所有程式碼,而 CspParameters 物件只適用于明確參考它的類別。 在未載入使用者設定檔的帳戶下模擬或執行時,這些設定很有用。

適用於

另請參閱