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

The requested FTP command is not supported when using HTTP proxy

Hi,

I am trying to upload files on FTP and used the code below:

Dim request As FtpWebRequest

request =
WebRequest.Create("ftp://ftp...../test.txt")
request.Method = WebRequestMethods.Ftp.UploadFile
request.Credentials = New
NetworkCredential(ftp_site_user_name, ftp_site_password)

Dim sourceStream As New
StreamReader("C:\Documents and Settings\.......\text.txt")

Dim filecontents() As Byte =
Encoding.UTF8.GetBytes(sourceStream.ReadToEnd())

sourceStream.Close()
request.ContentLength = filecontents.Length

Dim requestStream As Stream =
request.GetRequestStream()
requestStream.Write(filecontents, 0,
filecontents.Length)
requestStream.Close()

When I define to use proxy (in Interent options/connections/LAN
settings) I receive an error "The requested FTP command is not
supported when using HTTP proxy". When I define NOT to use proxy, the
file is transfered on FTP.

1. Is there a way for defining to bypass the proxy for this ftp
connection ?

2. Can I create subdirectories on FTP from code ?

3. StreamReader reads TXT files. How can I read ZIP files for uploading
on FTP ?

Thanks a lot.

May 31 '06 #1
2 10617
Hi Chirs,

I am having the same problem. Did you find a solution?

I am new in asp and I also have problems with this exception:

"The requested URI is invalid for this FTP command"

I paste the URI in windows explorer and I don't have any problems.

Any ideas?

Thanks a lot

Savvas

chris wrote:
Hi,

I am trying to upload files on FTP and used the code below:

Dim request As FtpWebRequest

request =
WebRequest.Create("ftp://ftp...../test.txt")
request.Method = WebRequestMethods.Ftp.UploadFile
request.Credentials = New
NetworkCredential(ftp_site_user_name, ftp_site_password)

Dim sourceStream As New
StreamReader("C:\Documents and Settings\.......\text.txt")

Dim filecontents() As Byte =
Encoding.UTF8.GetBytes(sourceStream.ReadToEnd())

sourceStream.Close()
request.ContentLength = filecontents.Length

Dim requestStream As Stream =
request.GetRequestStream()
requestStream.Write(filecontents, 0,
filecontents.Length)
requestStream.Close()

When I define to use proxy (in Interent options/connections/LAN
settings) I receive an error "The requested FTP command is not
supported when using HTTP proxy". When I define NOT to use proxy, the
file is transfered on FTP.

1. Is there a way for defining to bypass the proxy for this ftp
connection ?

2. Can I create subdirectories on FTP from code ?

3. StreamReader reads TXT files. How can I read ZIP files for uploading
on FTP ?

Thanks a lot.


Jun 21 '06 #2
Try request.Proxy = nothing;

sa**************@gmail.com wrote:
Hi Chirs,

I am having the same problem. Did you find a solution?

I am new in asp and I also have problems with this exception:

"The requested URI is invalid for this FTP command"

I paste the URI in windows explorer and I don't have any problems.

Any ideas?

Thanks a lot

Savvas

chris wrote:
Hi,

I am trying to upload files on FTP and used the code below:

Dim request As FtpWebRequest

request =
WebRequest.Create("ftp://ftp...../test.txt")
request.Method = WebRequestMethods.Ftp.UploadFile
request.Credentials = New
NetworkCredential(ftp_site_user_name, ftp_site_password)

Dim sourceStream As New
StreamReader("C:\Documents and Settings\.......\text.txt")

Dim filecontents() As Byte =
Encoding.UTF8.GetBytes(sourceStream.ReadToEnd())

sourceStream.Close()
request.ContentLength = filecontents.Length

Dim requestStream As Stream =
request.GetRequestStream()
requestStream.Write(filecontents, 0,
filecontents.Length)
requestStream.Close()

When I define to use proxy (in Interent options/connections/LAN
settings) I receive an error "The requested FTP command is not
supported when using HTTP proxy". When I define NOT to use proxy, the
file is transfered on FTP.

1. Is there a way for defining to bypass the proxy for this ftp
connection ?

2. Can I create subdirectories on FTP from code ?

3. StreamReader reads TXT files. How can I read ZIP files for uploading
on FTP ?

Thanks a lot.


Jun 22 '06 #3

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

Similar topics

2
by: Robert | last post by:
I am using the php4-cgi Debian package which is based on PHP 4.3.4. I have problems when running php4 on the command line. If I say something like $ php4 index.cgi a number of variables...
4
by: bmiras | last post by:
I've got a problem using urllib2 to get a web page. I'm going through a proxy using user/password authentification and i'm trying to get a page asking for a HTTP authentification. And I'm using...
7
by: Todd McNeill | last post by:
Hi- Something was just pointed out to me this morning. According to the V8 Command Reference, the RUNSTATS command no longer uses the SHRLEVEL CHANGE/REFERENCE clauses, and it looks to be...
10
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will...
3
by: bfprog | last post by:
Using IBM iSeries client access OLEDB provider to connect to DB2 on AS/400, but cannot create connection using .NET web app. Using following code: Dim cnTest As New...
2
by: pradeep_TP | last post by:
I am new to web services. I created a very simple web service with a method that returns a simple string object. I added a web reference to this web service from another project and I could...
5
by: CindyRob | last post by:
Using .NET framework 1.1 SP1, .NET framework SDK 1.1 SP1, Visual Studio .NET 2003, hotfixes 892202 and 823639. I create a proxy class using wsdl.exe, and in the serialized XML request, I see...
0
by: J Ames | last post by:
Please, if this is the incorrect forum for this question, let me know which forum is most appropriate. I want to make sure I get visibility with the proper gurus! I have a .NET console app that...
2
by: =?Utf-8?B?QW5keSBD?= | last post by:
Hi, I'm trying to load some XML into a dataset with C# but I have an issue with the schema. I'm using exactly the same code to successfully load other XML. The only difference is in the XML...
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
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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.