473,385 Members | 1,402 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,385 software developers and data experts.

FtpWebRequest Problem

Hello All:
I've seen some strange behavior with the .net FtpWebRequest component.
static void Main(string[] args)
{
Console.WriteLine("Connecting to server to list
directory...");
Uri uri = new Uri("ftp://192.168.0.3/data/");
FtpWebRequest listRequest =
(FtpWebRequest)WebRequest.Create(uri);
listRequest.Credentials = new NetworkCredential("user",
"pwd");
listRequest.Method = WebRequestMethods.Ftp.ListDirectory;
listRequest.KeepAlive = true;
listRequest.UseBinary = true;
listRequest.UsePassive = true;
FtpWebResponse listResponse =
(FtpWebResponse)listRequest.GetResponse();
//Console.WriteLine(listResponse.BannerMessage.ToStr ing());

StreamReader reader = new
StreamReader(listResponse.GetResponseStream());
string st = reader.ReadToEnd();
Console.WriteLine("List Response:");
Console.WriteLine(st);
Console.ReadLine();
}

This code will produce a WebException 550 File unavailable. The
Response object StatusDescription contains the value "550 Arguements
too long". The folder contains about 800 files. If I change the Uri
to:
Uri uri = new Uri("ftp://192.168.0.3/data/000*.dat");
the program works - it brings back a directory listing matching the
uri. Does anyone know if there is a problem or limitation with the
..Net FTP components?
-Bob

Oct 9 '06 #1
0 1324

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

Similar topics

0
by: Kevin Spencer | last post by:
Hi all, I am working on a service that uploads METAR weather information to the National Weather Service FTP site. The service I'm authoring is hosted on a Windows 200 server, and the NWS FTP...
7
by: jose.lopes.cruz | last post by:
I need to access a FTP Server. I'm using FTPWebRequest as described in visual studio 2005 documentation. Everything works fine except the following: 1) I dont know how to change de current...
2
by: Ian Hannah | last post by:
I am running the following code (using VS 2005) with the appropriate username and password and the request always timeouts: FtpWebRequest request =...
2
by: Ian Hannah | last post by:
If I create an MFC application in Visual Studio 6 using the following code: CInternetSession inet_session; CFtpConnection *ftp_connection; ftp_connection = inet_session.GetFtpConnection(...
3
by: Kevien Lee | last post by:
hi everyone I have a quick question when i use the FtpWebRequest. What I need to do is that: Connect a FTP server,check whether there is a folder if not,create it, then changed the path to...
0
by: Buddy Home | last post by:
Hello, I'm trying to upload a file programatically and occasionally I get the following error message. Unable to write data to the transport connection: An established connection was aborted...
5
by: Sendil kumar | last post by:
Hi All, The FtpWebRequest.GetResponse( ) method is not giving "550 File not found exception " when I do a directory list operation on a invalid(not present) directory in HP Unix and Sun Solaris...
9
by: Waldy | last post by:
Hi there, I have written a service in VS2005 that downloads files from an FTP site processes them and then deletes the files if successfully processed. It all works fine when run in our test lab...
6
by: Patrick.Simons | last post by:
I try to connect a FTPWebRequest through Proxy and VPN to a remote FTP- server. Sometimes it works sometimes not. When my VB.Net-App (2005) returns the error on the GetResponse-Method, I'll try to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.