Server returned an error: General failure - WeOnlyDo Discussion board

Server returned an error: General failure (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Satheesh Babu, Tuesday, February 05, 2008, 00:40 (5934 days ago)

Hi

We are using the WeOnlyDo.Client.SFTP.dll (Version 2.0.1.8). While we are able to connect to the SFTP server successfully, we weren't able to put the file in the SFTP server. The exception we get is Server returned an error: General failure . The line of code which causes this exception is

sftp1.PutFile(m_local_file_name)
Saying the error message Server returned an error: General failure
Where m_local_file_name is the path of the file in my local machine

ACTUAL CODE SNIPPET

Try
Dim sftp1 As New WeOnlyDo.Client.SFTP
Dim m_local_file_name As String = C:Documents and SettingssatheeshbabuDesktop est.txt
sftp1 = New WeOnlyDo.Client.SFTP
sftp1.Login = *************
sftp1.Password = *************
sftp1.RemotePath = test.txt
sftp1.Encryption = WeOnlyDo.Client.SFTP.Encryptions.Auto
sftp1.Blocking = True
sftp1.LicenseKey = *************
sftp1.TransferMode = WeOnlyDo.Client.SFTP.TransferModes.Binary
sftp1.Connect( ************* )
sftp1.PutFile(m_local_file_name)
IO.File.Delete(m_local_file_name)
Catch ex As Exception
Throw (ex)
End Try

Actually we are not getting any other detailed error message other than this general failure message. It would be of great help if someone could assist regarding this issue

Thank you,
Satheesh Babu

Re: Server returned an error: General failure

by wodDamir, Tuesday, February 05, 2008, 01:01 (5934 days ago) @ Satheesh Babu

Hi Satheesh,

I'm pretty sure that you receive this error because you are using incorrect paths. In all of our products, you need to use absolute paths. This includes RemotePath also.

In your code you are setting RemotePath property to test.txt . You should set this to something like /home/user/test.txt or /test.txt if you have permissions to write to root folder of the server.

Can you try something like that?

Regards,
Damba

Re: Server returned an error: General failure

by Satheesh Babu, Tuesday, February 05, 2008, 01:50 (5934 days ago) @ wodDamir

Hi Damba

Thanks for the reply. Actually i'm trying to SFTP to a windows server. For example, if i need to put a file(test.txt) in the folder in/0231 which is in the windows server

Do we need to specify something like

sftp1.RemotePath = /in/0231/test.txt

(or) do we need to specify the complete path (including the drive name etc)

Kindly Suggest

Regards,
Satheesh Babu

Re: Server returned an error: General failure

by wodDamir, Tuesday, February 05, 2008, 03:09 (5934 days ago) @ Satheesh Babu

Satheesh,

I suggest you to try /in/0231/test.txt . Regardless of the system your server is based on, usually start with / which is root.

Hope this helps.

Regards,
Damba

Re: Server returned an error: General failure

by Satheesh Babu, Tuesday, February 05, 2008, 17:35 (5934 days ago) @ wodDamir

Hi Damba

Thanks again for the reply. Eventhough i tried with the way you suggested for the remote path, still getting the same error

Server returned an error: General failure

Could there be any other reason for this, Kindly suggest

Thank you,
Satheesh Babu

Re: Server returned an error: General failure

by woddrazen, Tuesday, February 05, 2008, 17:41 (5934 days ago) @ Satheesh Babu

Hi Satheesh,


You are receiving error in PutFile line?

Can you try something like this:
[code]sftp1.PutFile( c:\somefolder\test.txt , /in/0231/test.txt ) [/code]
If problem persist any chance we can connect to your server and duplicate your issue? We will just connect few times and immediately disconnect.

Hope I helped.


Drazen

Re: Server returned an error: General failure

by Satheesh Babu, Wednesday, February 06, 2008, 23:09 (5933 days ago) @ woddrazen

Hi

Atlast i was able to find that the remotepath was the issue. When i tried to give the absolute remote path, i was able to put the file

Thanks for all the help

Regards,
Satheesh Babu