I need to delete some files that are not required from FTP using C#. Can someone tell me the possible exceptions that can occur during the entire operation like wrong credentials or FTP connection lost during deletion.
Thanks
请参阅 FtpStatusCode.*。您可以将其作为通用 WebException 捕获,然后检测它是否包含在上述内容中。
以下是通用 FTP 服务器返回列表: http ://en.wikipedia.org/wiki/List_of_FTP_server_return_codes
这是特定的.NET http://msdn.microsoft.com/en-us/library/system.net.ftpstatuscode.aspx