ConnectionStringSecurer.RestoreConnectionString Method
Restores a safe partial connection string to its full form, which includes sensitive information such as passwords.
Namespace: Microsoft.Data.Schema
Assembly: Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)
Syntax
'Declaration
Public Shared Function RestoreConnectionString ( _
partialConnection As String, _
dbProvider As String _
) As String
public static string RestoreConnectionString(
string partialConnection,
string dbProvider
)
public:
static String^ RestoreConnectionString(
String^ partialConnection,
String^ dbProvider
)
static member RestoreConnectionString :
partialConnection:string *
dbProvider:string -> string
public static function RestoreConnectionString(
partialConnection : String,
dbProvider : String
) : String
Parameters
- partialConnection
Type: System.String
The safe connection string as returned by the MakeSafeToPersist method.
- dbProvider
Type: System.String
The name of the ADO.NET data provider for the connection string, such as "System.Data.SqlClient" for SQL Server.
Return Value
Type: System.String
A connection string with all sensitive information fully restored.
Remarks
The user must be the same user who executed the MakeSafeToPersist, and the method must be called on the same computer.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.