DSACryptoServiceProvider.UseMachineKeyStore 属性

定义

获取或设置一个值,该值指示密钥是否应保留在计算机的密钥存储中(而不是保留在用户配置文件存储中)。Gets or sets a value indicating whether the key should be persisted in the computer's key store instead of the user profile store.

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

属性值

如果密钥应保留在计算机的密钥存储中,则为 true;否则为 falsetrue if the key should be persisted in the computer key store; otherwise, false.

注解

将此属性设置为 true 等效于将UseMachineKeyStore标志传递CspParameters给对象。Setting this property to true is equivalent to passing the UseMachineKeyStore flag to a CspParameters object. 属性应用于当前应用程序域中的所有代码, CspParameters而对象仅适用于显式引用该对象的类。 UseMachineKeyStoreThe UseMachineKeyStore property applies to all code in the current application domain, while the CspParameters object applies only to classes that explicitly reference it. 在未加载其用户配置文件的帐户下模拟或运行时,这些设置很有用。These settings are useful when impersonating or running under an account whose user profile is not loaded.

适用于

另请参阅