SshPermissionDeniedException was unhandled

May 6, 2011 at 7:45 PM

I keep trying to UploadFile() via SFTP to a freeFTPd server and I keep receiving the error "SshPermissionDeniedException was unhandled."  When I try the same code to a different server, it works fine.  I do have access to the directory and I can upload files to it without a problem when using Filezilla.

 

The error gets thrown in WaitHandle() of SftpSession.cs when index is 0.  I have no idea why this problem occurs, but I do love this library and I hope someone can figure out why this happens.  Thanks

Coordinator
May 9, 2011 at 5:57 PM

Can you put your code into try block and catch SshPermissionDeniedException exception.

The message property should have a text which is return by the server. May be it will give me a clue to what might be happening.

The reason you get this exception is because SFTP server returns SSH_FX_PERMISSION_DENIED status during SFTP operation.

Thanks,

Oleg