Skip to content

Commit

Permalink
Update FTPHelper.cs
Browse files Browse the repository at this point in the history
new NetworkCredential(ftpPassword, ftpPassword);
>>
new NetworkCredential(ftpUserID, ftpPassword);
  • Loading branch information
FangJY authored Jul 23, 2019
1 parent 1f8e068 commit 165f8cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Utility基础类大全/FTP操作类/FTPHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public string[] GetFileList(string url)
{
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(url));
reqFTP.UseBinary = true;
reqFTP.Credentials = new NetworkCredential(ftpPassword, ftpPassword);
reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);
reqFTP.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
WebResponse response = reqFTP.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
Expand Down Expand Up @@ -347,4 +347,4 @@ public void GotoDirectory(string DirectoryName, bool IsRoot)
ftpURI = "ftp://" + ftpServerIP + "/" + ftpRemotePath + "/";
}
}
}
}

0 comments on commit 165f8cb

Please sign in to comment.