Click here to Skip to main content
15,896,606 members

Comments by Member 13777104 (Top 10 by date)

Member 13777104 8-May-18 4:50am View    
Hi Richard,
I want to encrypt the file while uploading in to ftp server, like when we click on a file we need to encrypt as we all as upload in ftpserver and when we click on download in server it should decrypt. any idea on this
Member 13777104 8-May-18 4:46am View    
Hi, I have written below code to upload multiple files but the certain folder was not updated in ftp server,please helpwhere i went wrong.
public class WebRequestGetExample
{
public static void Main ()
{
try
{
// Get the object used to communicate with the server.
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://192...../E:\\folder1");
request.Method = WebRequestMethods.Ftp.UploadFile;
// This example assumes the FTP site uses anonymous logon.
request.Credentials = new NetworkCredential("username", "pwd");
// Copy the contents of the file to the request stream.
IEnumerable<string> files = Directory.EnumerateFiles(@"E:\\folder1");
using (WebClient client = new WebClient())
{
client.Credentials = new NetworkCredential("username", "password");
foreach (string file in files)
{
client.UploadFile("ftp://192..../E:\\folder1" + Path.GetFileName(file), file);
}
}

using (FtpWebResponse response = (FtpWebResponse)request.GetResponse())
{
Console.WriteLine("Upload File Complete, status {0}", response.StatusDescription);
}
}
catch(Exception e)
{

}
}
Member 13777104 4-May-18 7:43am View    
YES I HAVE CHECKED IT MY DEBUGGING THE CODE , I AM NOT GETTING WHAT TO DO WHERE I NEED TO CHANGE IN THE ABOVE, CAN YOU PLEASE HELP,THANK YOU
Member 13777104 4-May-18 6:58am View    
I have removed try catch blocks but still i am unable to get the command prompt output
Member 13777104 2-May-18 3:27am View    
sorry sir didnt get you, I am new to coding and working in c#, can you please give me an example