I am using WebClient.UploadFile to upload a file to this kind of URL – http://example.com/file.aspx via HTTP POST method.
How can I get that file and save it to a sepecific location on the server? What code should I write inside file.aspx to do this?
When I search, all examples assume I use the file upload control. But how can I get and save a file sent via HTTP POST generally in ASP.Net?
I am using C#, so C# code example will be great. But I have no probs converting VB to C#.
In the server-side page (which, BTW, ought to be an ASHX rather than an ASPX), use the
Request.Filescollection.For example, you can write
Request.Files[0].SaveAs(Server.MapPath("~/Something"))