M
Markus Freitag
Guest
Hello!
I need your support.
I have to convert a C++ code to C#.
C++ Code ( see below)
Which C# class library do I need to use to upload files?
How can I test it, is there a test tool somewhere?
My application should work, the files should be uploaded in parallel process. What can I do here?
BackgroundWorker? What is the best way to do this?
Do you have a good sample?
Thanks in adance.
FTPClient ftp;
long nReturnCode = ftp.Connect(strIP, strUser, strPassword, strRemotePort, strRemotePath);
if (nReturnCode == 0)
//...
nReturnCode = ftp.UploadFile(fileIt->m_sNameWithPath, fileIt->m_sName);
if (nReturnCode == 0)
{
FileHelper::deleteFile(fileIt->m_sNameWithPath);
pObj->WriteLog("File uploaded: " + fileIt->m_sName, 32);
}
else
{
ftp.Interrupt(); // error
pObj->WriteLog("Error while uploading.", 48);
}
Upload file to FTP using C#
Greetings Markus
Continue reading...
I need your support.
I have to convert a C++ code to C#.
C++ Code ( see below)
Which C# class library do I need to use to upload files?
How can I test it, is there a test tool somewhere?
My application should work, the files should be uploaded in parallel process. What can I do here?
BackgroundWorker? What is the best way to do this?
Do you have a good sample?
Thanks in adance.
- FtpWebRequest
- WebClient
FTPClient ftp;
long nReturnCode = ftp.Connect(strIP, strUser, strPassword, strRemotePort, strRemotePath);
if (nReturnCode == 0)
//...
nReturnCode = ftp.UploadFile(fileIt->m_sNameWithPath, fileIt->m_sName);
if (nReturnCode == 0)
{
FileHelper::deleteFile(fileIt->m_sNameWithPath);
pObj->WriteLog("File uploaded: " + fileIt->m_sName, 32);
}
else
{
ftp.Interrupt(); // error
pObj->WriteLog("Error while uploading.", 48);
}
Upload file to FTP using C#
Greetings Markus
Continue reading...