Szerkesztés

Megosztás a következőn keresztül:


SqlConnectionStringBuilder.PersistSecurityInfo Property

Definition

Gets or sets a value indicating if security-sensitive information, such as the password or access token, should be returned as part of the connection string on a connection created with this SqlConnectionStringBuilder after that connection has ever been in an open state.

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

Property Value

true if security-sensitive information should be returned as part of the connection string; otherwise, false. The default is false.

Remarks

This property corresponds to the "Persist Security Info" and "persistsecurityinfo" keys within the connection string.

Note

This property should only be set to true if your application has a specific need to read the password out of an already-opened database connection. The default value of false is the more secure setting. Using true for this property opens your application to security risks, such as accidentally logging or tracing the database password.

Applies to

See also