System.Net.FtpWebRequest.Credentials Property

Gets or sets the credentials used to communicate with the FTP server.

Syntax

public override ICredentials Credentials { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

You are not required to specify credentials when connecting using anonymous logon. You must set the FtpWebRequest.Credentials property by using a credential of type System.Net.NetworkCredential; this ensures that the user name and password can be read and sent to the server.

Note:

Credentials information is not encrypted when transmitted to the server unless the FtpWebRequest.EnableSsl property is set to true.

Changing FtpWebRequest.Credentials after calling the FtpWebRequest.GetRequestStream, FtpWebRequest.BeginGetRequestStream(AsyncCallback, object), FtpWebRequest.GetResponse, or FtpWebRequest.BeginGetResponse(AsyncCallback, object) method causes an InvalidOperationException exception.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0