Re: Webexception Error FTP 501
- From: "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 15 May 2006 11:39:15 -0400
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
.
- Prev by Date: Re: System clock events
- Next by Date: RE: DataGridViewTextBoxCell and binding
- Previous by thread: Re: Webexception Error FTP 501
- Next by thread: Re: Webexception Error FTP 501
- Index(es):
Relevant Pages
|