Mathijs Segers Mathijs Segers -4 years ago 189
C# Question

FtpWebRequest Disable PWD command after login

I'm writing an application which uses FTP to upload files to a certain different application at a certain port.

This application obviously is not a traditional FTP server in a sense that it has directories and files for download. It only outputs the upload to a certain directory (and converts the files as well but that's not relevant here).

By default FtpWebRequest also calls OPTS and PWD after login. Both of these commands result in a 500 response since the application does not know these commands.

Is there a way to avoid the CWD and possibly also the OPTS command on uploading?
I prefer not to use too many third party libraries, I'd rather send raw requests if possible.

Any help here, I've been googling for a while.

Answer Source

It seems that this is not possible. What I did to get this working was using a more simple implementation of FTP to work around it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download