473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

WebRequestMethods.Ftp Problem

Hello All:

I am building a small app that will download files from an FTP server
(SCO Unix). I am told that the filenames may be reused, so I have to
check the file size. However, the WebRequestMethods.Ftp.GetFileSize is
not returning anything from GetResponseStream(). A read of the stream
returns null. Has anybody else seen this behavior?
-Bob

Oct 3 '06 #1
3 4951
In article <11**********************@i3g2000cwc.googlegroups. com>,
ph******@bellsouth.net says...
Hello All:

I am building a small app that will download files from an FTP server
(SCO Unix). I am told that the filenames may be reused, so I have to
check the file size. However, the WebRequestMethods.Ftp.GetFileSize is
not returning anything from GetResponseStream(). A read of the stream
returns null. Has anybody else seen this behavior?
Are you sure the FTP Server you're talking to supports the SIZE command?
I know it's pretty much implemented by all FTP servers, but I don't
think it's in an RFC yet (its not in the original RFC for the FTP
protocol).

Does it work (and give back valid data) when you connect with a regular
FTP client?

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 5 '06 #2

Patrick Steele wrote:
Are you sure the FTP Server you're talking to supports the SIZE command?
I know it's pretty much implemented by all FTP servers, but I don't
think it's in an RFC yet (its not in the original RFC for the FTP
protocol).

Does it work (and give back valid data) when you connect with a regular
FTP client?

--
Patrick Steele
http://weblogs.asp.net/psteele
Hi Patrick:
Thanks for the response. I just downloaded CuteFTP and the properties
dialog is showing the correct byte count of the file. I'm assuming
that it gets this via the SIZE command, although I don't know that for
sure.
-Bob

Oct 5 '06 #3
In article <11**********************@i3g2000cwc.googlegroups. com>,
ph******@bellsouth.net says...
Hi Patrick:
Thanks for the response. I just downloaded CuteFTP and the properties
dialog is showing the correct byte count of the file. I'm assuming
that it gets this via the SIZE command, although I don't know that for
sure.
Best way is to use Windows' built-in FTP client. Go to a command prompt
and enter:

ftp [hostname]

Enter your username and password when prompted. Use "CD [dir]" to
change to the appropriate directory. The enter your "SIZE" command and
see what happens.

Or, actually, once you get connected, I think you can help "HELP" or
just "?" and the server will return you a list of commands it supports.

I just tried it on a personal website of mine and I got an invalid
command when I tried to use "SIZE".

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
1
by: newscorrespondent | last post by:
When I as for a list of the details for a directory what comes back? Columns 000-009 appear to be attributes. from Windows documentation h Hidden file s System file e Encrypted r Read-only a...
0
by: William LaMartin | last post by:
The results I get below are as expected except for the Date/Time information. This seems to be a bug in System.Net.WebRequestMethods.Ftp.ListDirectoryDetails. It is not allowing enough space for...
0
by: ajzele | last post by:
Is there a way for me to send a raw ftp command to a ftp server? Sample code: FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://192.168.140.81/ftproot/proba.txt"); ...
5
by: rinoesc | last post by:
Hello, I'm trying to create a ftp application for Windows Mobile. I'm using VisualStudio 2008 with OpenNETCF Framework for Windows Mobile. I have a problem with the following code... string...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.