For uploading a file to an HTTP server, I am following the example at https://www.example-code.com/csharp_winrt/http_multipart_form_data_upload.asp
I am getting a 404 Not Found error in the http.SynchronousRequestAsync() method.
I think it is due to an incorrect setting of httpRequest.Path property. In your example you set it as req.Path = "rcvFormDataUpload.aspx";
I simply want to upload the file on mobile to server at a location -> server = xxx.xxx.xxx.xxx folder on server = webshare and destination file name = something.bin.
What value do i need to set in req.Path? I am using an IIS server for testing, and I don't have any .aspx page.
asked Jun 24 at 10:47
Unlike FTP or SFTP, an HTTP upload requires an implementation both on the client-side AND server-side. The client-side could simply be a browser with a form, or it could be an application capable of sending the multipart/form-data POST.
The server side must be implemented to receive the HTTP request. It could be any sort of implementation: PHP, C#, Perl, Java, etc.
(In general, any HTTP POST must be directed to a target endpoint where there is something to receive the POST and handle it..)
See https://www.chilkatsoft.com/p/p_534.asp for an example.
answered Jun 24 at 10:50