I upload a file from a C # application to an ASP.Net website, both written by me, so I have access to the code.
But it works for a text file (1 KB), but not for a MOV file (77 MB).
In both cases, I use UploadProgressChanged to make progress. The TXT file goes 100%, and the MOV file only up to 50%. When this is done, I will find only the TXT file stored on the server, but not the MOV file.
Why is this happening? How can I make it work?
Windows Application Code - C #
Client.UploadFileAsync(new Uri("http://localhost:xxxxxx/Default.aspx"), "c:\\1.MOV");
The default code .aspx is VB
Protected Sub Page_Load(...) Handles Me.Load If Request.Files IsNot Nothing Then If Request.Files.Count > 0 Then Request.Files(0).SaveAs(Server.MapPath("~/1.mov")) Response.Write("File saved at: " + Server.MapPath("~/1.mov")) Else Response.Write("At least one file should be sent") End If Else Response.Write("No file received") End If End Sub
user529141
source share