WinSCP.SessionRemoteException: Error transferring file
In the .net application that we are using, we are getting the error as shown below.
Please help us resolve it asap.
CODE:=======================================================================
using (Session objSession = new Session())
{
objSession.ExecutablePath = winScpExeWithPath;
// Connect
objSession.Open(objSessionOptions);
// Upload files
TransferOptions objTransferOptions = new TransferOptions();
objTransferOptions.TransferMode = TransferMode.Binary;
TransferOperationResult transferResult = objSession.PutFiles(localPath, FTPFolder, false, objTransferOptions);
// Transfer result
if (!transferResult.IsSuccess)
{
WriteLog("File transfer error: " + transferResult.Transfers[0].Error + Environment.NewLine + "Details:" + Environment.NewLine + (((System.Exception)(transferResult.Transfers[0].Error)).InnerException).Message);
return false;
}
else
{
return true;
}
}
ERROR LOG:=======================================================================
File transfer error: WinSCP.SessionRemoteException: Error transferring file 'C:\India-Dev\EMEA\NetSearch\EBTA Service\trunk\EBTAAmexUpload\TEST\AmexUpload\FileUpload\IM1I50EBA'. ---> WinSCP.SessionRemoteException: Copying files to remote side failed.
Access is denied.
Win32 error: Access is denied.
Error details: File system denied the access.
End
--- End of inner exception stack trace ---
Details:
Copying files to remote side failed.
Access is denied.
Win32 error: Access is denied.
Error details: File system denied the access.
End