Re: Webexception Error FTP 501

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You're not giving us much to go on here. While you know what "the parameters
I am using for the RETR command" are, you still haven't told us.

In fact, the file to download must be part of the RequestUri that you create
when creating the FtpWebRequest. and are you using one of the
WebRequestMethods.Ftp enumeration values? If not, what *are* you doing?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"arbytech" <arbytech@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BB84D3CA-1FA4-43F4-924F-30124C478B4C@xxxxxxxxxxxxxxxx
Thank you both for your replies. Unfortunately I do not know which
parameter
is throwing the 501 error since the parameters I am using for the RETR
command (using the WebRequestMethods.Ftp.DownloadFile) are the same
strings I
use for the VB6 wininet.dll stuff. Is there anyway to look inside the
request
to see which line or command the process is failing at?

Thanks - Randy
"arbytech" wrote:

Hi everyone,

I am trying to get the WebRequestMethods.Ftp.DownloadFile working using
the
101 Samples for the Base Class Library from MS. I can get through the
authentication part OK but when the code gets to:

Dim ftpResponse As FtpWebResponse = CType(ftpRequest.GetResponse,
FtpWebResponse)

I receive a Webexception error of "The remote server returned an error:
(501) Syntax error in parameters or arguments. I searched around a bit
but
didn't find anything more specific on the 501 error.

I am fairly new to VB 2005 (moving on from VB6) but I have used the
wininet.dll (InternetOpen, InternetConnect, FtpGetFile) to do the same
ftp
download in VB6. I didn't really want to use that again since the
framework
2.0 has the ftp functions.

Also the server that I ftp to is an AS/400 system, but I really don't
remember having to do anything special with the code I used in VB6. I was
hoping that the issue is just a learning curve problem for me!

Thanks for your help!
Randy


.



Relevant Pages

  • Re: FTP PUT with Store Unique
    ... years ago but had totally forgotten - I appreciated that the STOU command is ... covers the point I want to make which is that the FTP client commands are ... An SUNIQUE command compatible ...
    (bit.listserv.ibm-main)
  • Re: FTP PUT with Store Unique
    ... The best list for topics related to the Communications Server IP ... command or vice versa. ... Instructs the FTP client not to include a name with the STOU ... -- If NONAME is in effect, no name string specifying a foreign_file value follows ...
    (bit.listserv.ibm-main)
  • Re: FTP PUT with Store Unique
    ... a date/time stamp into the name before the FTP step. ... I foolishly assumed when I saw the SUnique parameter that - of course! ... command or vice versa. ... -- If NAME is in effect, the name string specifying a foreign_file value ...
    (bit.listserv.ibm-main)
  • Re: Problem about Window Xp SP2 firewall and the buildin FTP command
    ... I copy your example ftp command file to a.txt saved in C:\dell folder. ... I cannot turn off Windows Firewall, since it is controlled by Domain ...
    (microsoft.public.windowsxp.general)
  • [NT] Multiple Vulnerabilities Found in PlatinumFTPserver
    ... A vulnerability in the product allows remote attackers to cause the server ... to traverse into directories that reside outside the bounding FTP root ... delete files and perform a DoS attack on the server. ... 200 PORT command successful ...
    (Securiteam)