Click or drag to resize

CredentialDialog.StoreCredential Method

Stores the specified credentials in the operating system's credential store for the currently logged on user.

Namespace:  Ookii.Dialogs
Assembly:  Ookii.Dialogs (in Ookii.Dialogs.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void StoreCredential(
	string target,
	NetworkCredential credential
)

Parameters

target
Type: System.String
The target name for the credentials.
credential
Type: System.Net.NetworkCredential
The credentials to store.
Exceptions
ExceptionCondition
ArgumentNullException

target is null.

-or-

credential is null.

ArgumentExceptiontarget is an empty string ("").
CredentialExceptionAn error occurred storing the credentials.
Remarks
Note Note
The Domain property is ignored and will not be stored, even if it is not null.

If the credential manager already contains credentials for the specified target, they will be overwritten; this can even overwrite credentials that were stored by another application. Therefore it is strongly recommended that you prefix the target name to ensure uniqueness, e.g. using the form "Company_ApplicationName_www.example.com".

See Also