Adds a System.Net.NetworkCredential instance to the credential cache.
- uriPrefix
- A Uri that contains the URI prefix of resources to which cred grants access.
- 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.
- cred
- A System.Net.NetworkCredential to add to the credential cache.
Type Reason ArgumentNullException The uriPrefix or authType parameter is null. ArgumentException The cache already contains a credential for the specified uriPrefix and authType.
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.
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0