System.Net.CredentialCache.Remove Method

Deletes a System.Net.NetworkCredential instance from the cache if it is associated with the specified Uniform Resource Identifier (URI) prefix and authentication protocol.

Syntax

public void Remove (Uri uriPrefix, string authType)

Parameters

uriPrefix
A Uri that specifies the URI prefix of the resources that the credential is used for.
authType
The authentication scheme used by the host named in uriPrefix.

Remarks

This method removes a System.Net.NetworkCredential instance from the System.Net.CredentialCache if the specified URI prefix and authentication protocol match those associated with the credential. Multiple calls to the CredentialCache.Remove(Uri, string) method for the same System.Net.NetworkCredential have no effect.

If authType is null or uriPrefix is null, or no matching credential is found in the cache, this method does nothing.

Requirements

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