CredentialCache.Add Method (String, Int32, String, NetworkCredential)
Assembly: System (in system.dll)
public: void Add ( String^ host, int port, String^ authenticationType, NetworkCredential^ credential )
public void Add ( String host, int port, String authenticationType, NetworkCredential credential )
public function Add ( host : String, port : int, authenticationType : String, credential : NetworkCredential )
A String that identifies the host computer.
A Int32 that specifies the port to connect to on host.
A String that identifies the authentication scheme used when connecting to host using cred. See Remarks.
The NetworkCredential to add to the credential cache.
This method places a NetworkCredential instance into the CredentialCache. The cache stores credentials in the order in which they are added to it. When the GetCredential(String,Int32,String) method is called, it returns a NetworkCredential instance that is selected by matching the host, port, and authType. The comparison is done case-insensitively.
The supported values for authType are "NTLM", "Digest", "Kerberos", and "Negotiate". This method does not work for HTTP or FTP protocols.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.