Post by Backslide » Mon, 12 Nov 2001 05:44:45

I can't get the UploadFile() method to work.  I assume I must have something
set up wrong.  My code looks like this:
WebClient myClient = new WebClient();
byte[] response = myClient.UploadFile("http://localhost/upload/newfile.txt",
"POST", "c:\temp\test.txt");

I get a WebException with a status of ProtocolError.  If I look in my IIS
log, I am getting a 405 error:

20:09:47 POST /upload/newfile.txt 405

 My Upload virtual directory has "Write" access allowed, and is set to
Anonymous and Integrated directory security.

Can anyone tell me what I need to do to get this method to work?



1. WebClient.UploadFile() and WebClient.DownloadFile()

How do I have checkpoint when using WebClient.UploadFile
() and WebClient.DownloadFile() so that when the upload
or download fails then I don't have to upload/download in
the beginning? (resume/suspend ability)

Or is there any other ways in doing this?


2. PPPD question

3. Disk cache

4. Getting 401 Unauthorized error using WebClient UploadFile method

5. R4700 in Indy?

6. Strategic Partner Opportunity: Data Network Security and Encryption

7. WebClient.UploadFile results in "corrupted" file

8. WebClient.UploadFile

9. WebClient.UploadFile() -- How to get it working??

10. WebClient.UploadFile() --Urgent !!!

11. UploadFile method fails