Click or drag to resize

CredentialDialogRetrieveCredential Method

Retrieves credentials for the specified target from the operating system's credential store for the current user.

Namespace:  Ookii.Dialogs
Assembly:  Ookii.Dialogs (in Ookii.Dialogs.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static NetworkCredential RetrieveCredential(
	string target
)

Parameters

target
Type: SystemString
The target name for the credentials.

Return Value

Type: NetworkCredential
The credentials if they were found; otherwise, .
Exceptions
ExceptionCondition
ArgumentNullExceptiontarget is .
ArgumentExceptiontarget is an empty string ("").
CredentialExceptionAn error occurred retrieving the credentials.
Remarks

If the requested credential was not originally stored using the CredentialDialog class (but e.g. by another application), the password may not be decoded correctly.

This function does not check the application instance credential cache for the credentials; for that you can use the RetrieveCredentialFromApplicationInstanceCache(String) function.

See Also