Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

jaimel

Re: Getting FTP server response codes

martin wrote:

There's no explicit API to retrieve an underlying protocol error code. All you can do is to parse the code from the exception message.


Thank you for your response.
martin

Re: Getting FTP server response codes

There's no explicit API to retrieve an underlying protocol error code. All you can do is to parse the code from the exception message.
jaimel

Getting FTP server response codes

Hello everyone,
I'm using the WinSCP's .NET library with C#. I was wondering if you guys could help with an issue I'm having.

I have a service set up to go through a list of ftp connections. One specific ftp server once in a while will respond with Code 426 (Connection closed; transfer aborted.) and when this happens I need to run custom logic.
I'm unable to find anything within the .NET assembly that could return me the actual code. I see that they are being logged in the session log along with the description, but I'm trying to stay away from having to parse through the log.

Is there any methods/events that I'm overlooking that could help with this?
Or is WinSCP's .NET assembly unable to handle this atm?

Any help will be appreciated.
Thank you.