G
Guest
Hi,
I am not sure if anyone has encountered the same problem and know the
answer...
When I set an FtpWebRequest to do PWD with the following code,
_FtpWebRequest.Method = WebRequestMethods.Ftp.PrintWorkingDirectory;
_FtpWebResponse = (FtpWebResponse)_FtpWebRequest.GetResponse();
the trace showed that FtpWebRequest also does a CWD, as shown in the
following trace:
System.Net Information: 0 : [3756] FtpControlStream#33163964 - Sending
command [PWD]
System.Net Information: 0 : [3756] FtpControlStream#33163964 - Received
response [257 "*.*/*" is the current directory]
System.Net Information: 0 : [3756] FtpControlStream#33163964 - Sending
command [CWD *.*/*/]
System.Net Information: 0 : [3756] FtpControlStream#33163964 - Received
response [550 Invalid directory.]
As you can see from the last two lines of trace, the framework performs an
CWD with and extra "/" which makes the server throw a 550 error.
Another related issue is that the framework seems to treat "*.*/*" in the
above example as the root directory so when I specify a remote directory,
FtpWebRequest fwr =
(FtpWebRequest)WebRequest.Create("ftp://usa.ftptls.edisrvcs.com/GXS.U9999443");
where "GXS.U9999443" is the directory, the trace showed that .NET try to
change to the directory under "*.*/*" with a "CWD *.*/*/gxs.u9999443" ,
instead of just simply change to that directory with the command "CWD
gxs.u9999443" thus an error occurs:
System.Net Information: 0 : [4352] FtpControlStream#2637164 - Received
response [257 "*.*/*" is the current directory]
System.Net Information: 0 : [4352] FtpControlStream#2637164 - Sending
command [CWD *.*/*/GXS.U9999443]
Has anyone encountered the same issue and how did you resolve it?
Thanks!!!
Eugene
I am not sure if anyone has encountered the same problem and know the
answer...
When I set an FtpWebRequest to do PWD with the following code,
_FtpWebRequest.Method = WebRequestMethods.Ftp.PrintWorkingDirectory;
_FtpWebResponse = (FtpWebResponse)_FtpWebRequest.GetResponse();
the trace showed that FtpWebRequest also does a CWD, as shown in the
following trace:
System.Net Information: 0 : [3756] FtpControlStream#33163964 - Sending
command [PWD]
System.Net Information: 0 : [3756] FtpControlStream#33163964 - Received
response [257 "*.*/*" is the current directory]
System.Net Information: 0 : [3756] FtpControlStream#33163964 - Sending
command [CWD *.*/*/]
System.Net Information: 0 : [3756] FtpControlStream#33163964 - Received
response [550 Invalid directory.]
As you can see from the last two lines of trace, the framework performs an
CWD with and extra "/" which makes the server throw a 550 error.
Another related issue is that the framework seems to treat "*.*/*" in the
above example as the root directory so when I specify a remote directory,
FtpWebRequest fwr =
(FtpWebRequest)WebRequest.Create("ftp://usa.ftptls.edisrvcs.com/GXS.U9999443");
where "GXS.U9999443" is the directory, the trace showed that .NET try to
change to the directory under "*.*/*" with a "CWD *.*/*/gxs.u9999443" ,
instead of just simply change to that directory with the command "CWD
gxs.u9999443" thus an error occurs:
System.Net Information: 0 : [4352] FtpControlStream#2637164 - Received
response [257 "*.*/*" is the current directory]
System.Net Information: 0 : [4352] FtpControlStream#2637164 - Sending
command [CWD *.*/*/GXS.U9999443]
Has anyone encountered the same issue and how did you resolve it?
Thanks!!!
Eugene