tags:

views:

215

answers:

1

If I call System.Net.WebClient.UploadFile(fileUrl, "DELETE", localFileName), is the file at localFileName actually uploaded to the server? Is there a better way to accomplish this?

+1  A: 

I had a quick look at the WebClient code with Reflector, and it seems to upload the file even if the method is DELETE. I think a better way of doing this would be to use an HttpWebRequest explicitly, where you can specify the method without uploading the file

Thomas Levesque
HttpWebRequest worked. Thanks.
Aaron