I am getting the following error when trying to call
GetRequestStream(): System.Net.WebException: The requested URI is
invalid for this FTP command..
Code where the exception catches:
...
FtpWebRequest uploadRequest =
(FtpWebRequest)WebRequest.Create(uploadUrl);
uploadRequest.Method =
WebRequestMethods.Ftp.UploadFile;
// UploadFile is not supported through an Http proxy
// so we disable the proxy for this request.
uploadRequest.Proxy = null;
exception------ requestStream = uploadRequest.GetRequestStream();
fileStream = File.Open(fileName, FileMode.Open);
....
On my machine I set up a ftp server through IIS, allowed anonymous
connections and allowed read/write privileges. Anybody can shed some
light on this? 5 5795
Well, what is the url that you are passing to the request?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<re***********@gmail.comwrote in message
news:11**********************@y42g2000hsy.googlegr oups.com...
>I am getting the following error when trying to call
GetRequestStream(): System.Net.WebException: The requested URI is
invalid for this FTP command..
Code where the exception catches:
...
FtpWebRequest uploadRequest =
(FtpWebRequest)WebRequest.Create(uploadUrl);
uploadRequest.Method =
WebRequestMethods.Ftp.UploadFile;
// UploadFile is not supported through an Http proxy
// so we disable the proxy for this request.
uploadRequest.Proxy = null;
exception------ requestStream = uploadRequest.GetRequestStream();
fileStream = File.Open(fileName, FileMode.Open);
....
On my machine I set up a ftp server through IIS, allowed anonymous
connections and allowed read/write privileges. Anybody can shed some
light on this?
On Nov 2, 2:57 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Well, what is the url that you are passing to the request?
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
<repairman2...@gmail.comwrote in message
news:11**********************@y42g2000hsy.googlegr oups.com...
I am getting the following error when trying to call
GetRequestStream(): System.Net.WebException: The requested URI is
invalid for this FTP command..
Code where the exception catches:
...
FtpWebRequest uploadRequest =
(FtpWebRequest)WebRequest.Create(uploadUrl);
uploadRequest.Method =
WebRequestMethods.Ftp.UploadFile;
// UploadFile is not supported through an Http proxy
// so we disable the proxy for this request.
uploadRequest.Proxy = null;
exception------ requestStream = uploadRequest.GetRequestStream();
fileStream = File.Open(fileName, FileMode.Open);
....
On my machine I set up a ftp server through IIS, allowed anonymous
connections and allowed read/write privileges. Anybody can shed some
light on this?- Hide quoted text -
- Show quoted text -
I'm just accessing ftp://<myipaddress>/ it works fine if I open up
explorer and type in the address and create a file.
Are you using PASV or no when going through explorer? Also, are you
setting binary to true/false depending on how you want to upload the file?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<re***********@gmail.comwrote in message
news:11*********************@o3g2000hsb.googlegrou ps.com...
On Nov 2, 2:57 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
> Well, what is the url that you are passing to the request?
-- - Nicholas Paldino [.NET/C# MVP] - m...@spam.guard.caspershouse.com
<repairman2...@gmail.comwrote in message
news:11**********************@y42g2000hsy.googleg roups.com...
>I am getting the following error when trying to call
GetRequestStream(): System.Net.WebException: The requested URI is
invalid for this FTP command..
Code where the exception catches:
...
FtpWebRequest uploadRequest =
(FtpWebRequest)WebRequest.Create(uploadUrl);
uploadRequest.Method =
WebRequestMethods.Ftp.UploadFile;
// UploadFile is not supported through an Http proxy
// so we disable the proxy for this request.
uploadRequest.Proxy = null;
exception------ requestStream = uploadRequest.GetRequestStream();
fileStream = File.Open(fileName, FileMode.Open);
....
On my machine I set up a ftp server through IIS, allowed anonymous
connections and allowed read/write privileges. Anybody can shed some
light on this?- Hide quoted text -
- Show quoted text -
I'm just accessing ftp://<myipaddress>/ it works fine if I open up
explorer and type in the address and create a file.
On Nov 2, 3:16 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Are you using PASV or no when going through explorer? Also, are you
setting binary to true/false depending on how you want to upload the file?
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
<repairman2...@gmail.comwrote in message
news:11*********************@o3g2000hsb.googlegrou ps.com...
On Nov 2, 2:57 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Well, what is the url that you are passing to the request?
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
<repairman2...@gmail.comwrote in message
>news:11**********************@y42g2000hsy.googleg roups.com...
I am getting the following error when trying to call
GetRequestStream(): System.Net.WebException: The requested URI is
invalid for this FTP command..
Code where the exception catches:
...
FtpWebRequest uploadRequest =
(FtpWebRequest)WebRequest.Create(uploadUrl);
uploadRequest.Method =
WebRequestMethods.Ftp.UploadFile;
// UploadFile is not supported through an Http proxy
// so we disable the proxy for this request.
uploadRequest.Proxy = null;
exception------ requestStream = uploadRequest.GetRequestStream();
fileStream = File.Open(fileName, FileMode.Open);
....
On my machine I set up a ftp server through IIS, allowed anonymous
connections and allowed read/write privileges. Anybody can shed some
light on this?- Hide quoted text -
- Show quoted text -
I'm just accessing ftp://<myipaddress>/ it works fine if I open up
explorer and type in the address and create a file.- Hide quoted text -
- Show quoted text -
I am not using PASV and I am not setting binary to true/false.
Found the problem. the URI needed to include the filename in it, not
just the address of the server. Thanks for you help though This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Joe Bloggs |
last post by:
I have a C# MRS application that uses the ReportingService's Render
method to retrieve a byte array containing a report.
The following error message occurs
An unhandled exception of type...
|
by: genc_ ymeri at hotmail dot com |
last post by:
Hi,
I'm trying to recieve the response status code rather than the message in
the below code :
try
{
responseArray =
myWebClient.UploadValues(uriString,"POST",myNameValueCollection);
}...
|
by: G Joseph |
last post by:
Hello,
I am getting a WebException.TrustFailure when I call
HttpwebRequest.GetResponse. Anybody has an idea how to
resolve this issue? The code works correctly in other
sites. I noticed that,...
|
by: Joey Guerra |
last post by:
Hi. I've been researching how to resolve this issue, but haven't found
a solution. I saw a post referring to the SecureChannelFailure
WebException status, but no resolution. Any help/direction is...
|
by: Marcos Martínez |
last post by:
I am trying to generate and to consume a file RSS dinamicamente. I generate
it correctly, if I call from the explorer (http://localhost/Prueba/rss.aspx)
or an application client RSS Bandit, for...
|
by: etantonio |
last post by:
Good morning, I've a problem, in the past I translate my site from
google or altavista with a code similar to this :
<%@ Page Language="c#" Trace="true" Debug="true" %>
<%@ import...
|
by: Stephen H. |
last post by:
Hello,
I'm developing a ppc-application that consumes a webservice on my local
machine. For testing the service is the HelloWorld service and the app is
just a form with a button that calls the...
|
by: tlan |
last post by:
Hi,
I got this error when I move my web service to Windows2003 server. I
spent hours scouting on the internet and could find any answer. Please
help!!!
I the webservice is timeout between 1...
|
by: Tim Reynolds |
last post by:
Our .Net application calls a web method of aplpication 2 that resides on
their Apache server. When I as a developer C#, Studios 2003, make the call to
their web method from my desktop, I receive no...
|
by: =?Utf-8?B?UGhpbGlwIEs=?= |
last post by:
Simplifying the code a bit its like this:
try
{
myRemotingObj.Myfunction(string, string,string,string,timeSpan)
}
catch(WebException)
{
commsUp = false;
}
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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: 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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |