Mono Class Library: System.Net.CredentialCache Overview | Members

System.Net.CredentialCache.Add Method

Adds a System.Net.NetworkCredential instance to the credential cache. [Edit]

public void Add (Uri uriPrefix, string authType, NetworkCredential cred)

Parameters

uriPrefix
A Uri that contains the URI prefix of resources to which cred grants access. [Edit]
authType
A string containing the authentication type used by the resource named in uriPrefix . This string is required to be identical to the IAuthenticationModule.AuthenticationType of the authentication module that uses the credential. [Edit]
cred
A System.Net.NetworkCredential to add to the credential cache. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionThe uriPrefix or authType parameter is null. [Edit]
ArgumentExceptionThe cache already contains a credential for the specified uriPrefix and authType. [Edit]

Remarks

The cache stores credentials in the order in which they are added.

Note: Use the CredentialCache.GetCredential(Uri, string) method to retrieve System.Net.NetworkCredential instances.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0