System.Net.CredentialCache.Remove Method

Deletes a System.Net.NetworkCredential instance from the cache if it is associated with the specified host, port, and authentication protocol.

Syntax

public void Remove (string host, int port, string authenticationType)

Parameters

host
A string that identifies the host computer.
port
A int that specifies the port to connect to on host.
authenticationType
A string that identifies the authentication scheme used when connecting to host. See Remarks.

Remarks

This method removes a System.Net.NetworkCredential instance from the System.Net.CredentialCache if the specified host, port, and authentication protocol match those associated with the credential. Multiple calls to the CredentialCache.Remove(string, int, 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: 2.0.0.0, 4.0.0.0