Szerkesztés

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


RsaProtectedConfigurationProvider.ExportKey(String, Boolean) Method

Definition

Exports an RSA key from the key container.

public:
 void ExportKey(System::String ^ xmlFileName, bool includePrivateParameters);
public void ExportKey (string xmlFileName, bool includePrivateParameters);
member this.ExportKey : string * bool -> unit
Public Sub ExportKey (xmlFileName As String, includePrivateParameters As Boolean)

Parameters

xmlFileName
String

The file name and path to export the key to.

includePrivateParameters
Boolean

true to indicate that private parameters are exported; otherwise, false.

Exceptions

path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.

path is null.

The specified path, file name, or both exceed the system-defined maximum length.

The specified path is invalid, such as being on an unmapped drive.

An error occurred while opening the file.

path specified a file that is read-only.

-or-

This operation is not supported on the current platform.

-or-

path specified a directory.

-or-

The caller does not have the required permission.

The file specified in path was not found.

path is in an invalid format.

The caller does not have the required permission.

Applies to

See also