RsaProtectedConfigurationProvider.ExportKey(String, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈