I am uploading a file from a C# application to an ASP.Net website, both written by me so I have access to the code.
But, it is working for a text file (1KB) but not for a MOV file (77MB).
In both cases, I am using UploadProgressChanged to get the progress. The TXT file goes to 100% while the MOV file goes only till 50%. When done, I only find the TXT file saved on the server but not the MOV file.
Why is this happening? How can I get it to work?
Windows App Code - C#
Client.UploadFileAsync(new Uri("http://localhost:xxxxxx/Default.aspx"), "c:\\1.MOV");
Default.aspx Code - 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