Add Method (String, Int32, String, NetworkCredential)
Collapse the table of content
Expand the table of content

CredentialCache.Add Method (String, Int32, String, NetworkCredential)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Adds a NetworkCredential instance for use with SMTP to the credential cache and associates it with a host computer, port, and authentication protocol. Credentials added using this method are valid for SMTP only. This method does not work for HTTP or FTP requests.

Namespace:  System.Net
Assembly:  System.Net (in System.Net.dll)

public void Add(
	string host,
	int port,
	string authenticationType,
	NetworkCredential credential
)

Parameters

host
Type: System.String
A String that identifies the host computer.
port
Type: System.Int32
A Int32 that specifies the port to connect to on host.
authenticationType
Type: System.String
A String that identifies the authentication scheme used when connecting to host using credential.
credential
Type: System.Net.NetworkCredential
The NetworkCredential to add to the credential cache.

Windows Phone OS

Supported in: 8.1

Show:
© 2017 Microsoft