Facing issue while uploading the file on FTP. Below is the code.
private void UploadFileToFTP(string directoryName, string filename, byte[] bytes)
{
try
{
string ftpUserName = "username";
string ftpPassword = "password";
var requestUriString = "file pah on ftp";
var request = (FtpWebRequest)[login to view URL](requestUriString);
[login to view URL] = [login to view URL];
[login to view URL] = new NetworkCredential(ftpUserName, ftpPassword);
[login to view URL] = true;
[login to view URL] = true;
[login to view URL] = [login to view URL];
[login to view URL]();
using (Stream requestStream = [login to view URL]())
{
[login to view URL](bytes, 0, [login to view URL]);
[login to view URL]();
FtpWebResponse response = (FtpWebResponse)[login to view URL]();
[login to view URL]();
}
}
catch (Exception ex)
{
}
}
I am facing below crash..
The remote server returned an error: (550) File unavailable (e.g., file not found, no access).