Share via


Credentials Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

Syntax

'Declaration
Public Property Credentials As NetworkCredential
public NetworkCredential Credentials { get; set; }
public:
property NetworkCredential^ Credentials {
    NetworkCredential^ get ();
    void set (NetworkCredential^ value);
}
member Credentials : NetworkCredential with get, set
function get Credentials () : NetworkCredential
function set Credentials (value : NetworkCredential)

Property Value

Type: System.Net. . :: . .NetworkCredential
An ICredentials instance; otherwise, nullNothingnullptrunita null reference (Nothing in Visual Basic) if the property has not been set.

Remarks

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

.NET Framework Security

See Also

Reference

FtpWebRequest Class

System.Net Namespace