Questions tagged [downloadfileasync]

Downloads the specified resource to a local file as an asynchronous operation and returns a task object. These methods do not block the calling thread.

71 questions
0
votes
0 answers

DownloadFileAsync 'blocks' in c#?

When I use DownloadFileAsync, it seems to 'block' something. I need the program to be able to download more strings while the file is downloading (downloading a file, but user is still able to search a directory for links to download more…
desu
  • 113
  • 7
0
votes
1 answer

WebClient DownloadFileAsync File Exists

Is there a recommended method for using DownloadFileAsyc and determining if the file exists? It seems that the only way I can tell is on the DownloadCompleted event the error property has a 404 error in it, and the there's a file created that is 0…
JoelHess
  • 1,166
  • 2
  • 15
  • 28
0
votes
1 answer

Downloading Video doesnt work, streaming does

The code: WebClient webClient = new WebClient(); webClient.DownloadProgressChanged += t_ProgressChanged; webClient.DownloadFileAsync(new Uri("http://cdn3.streamcloud.eu:8080/6hv75ivjnkoax3ptx3silq7q6hn4jq324yv5gophqq4eq7fqqglgw5kneq/video.mp4"),…
Saimo
  • 11
  • 1
0
votes
1 answer

Waiting DownloadFileAsync with ManualResetEvent c++/cli

i'm having a little but frustrating problem in my C++/CLI with windows forms application. So the problem is that i have to download a file from a webserver by using a WebClient istance. Normally i use DownloadFile and not DownoadFileAsyn, but if i…
0
votes
1 answer

DownloadFileAsync is not working/called. It is skipped to DownloadCompleted even there is no downloaded file

I have problem. I'm using Visual Studio 2013 (Visual Basic) and on my computer everything works fine but on other doesn't. Example: client1.DownloadFileAsync is not getting called and client1_DownloadCompleted is called even there is no downloaded…
Bokyyy412
  • 1
  • 1
0
votes
3 answers

how send a parametr from a method to another android

hi i have a DownloadFileAsync class for download file from url i download file perfect from web but when download complete i want to play mp3 file from system but i cant send address file from doInBackground to onPostExecute my code is : protected…
pencilvania
  • 276
  • 1
  • 4
  • 18
0
votes
1 answer

WebClient.DownloadFileAsync() does not download files correctly on slow network

My application is used to download files. After the files are downloaded, the size of those files is compared to elements in an XML file for validation. The XML file has an element for each file with a "size" attribute. This is the size that the…
user1172282
  • 527
  • 1
  • 9
  • 19
0
votes
1 answer

DownloadFileAsync doesn't download file but completed event is fired?

Alright, I'm at a loss here. I am trying to download a jar file and then make a batch file that runs it. I was able to download this file once before with my code, but now the completed event fires (I think, because the code inside it runs. Sorry…
user1522456
  • 37
  • 1
  • 6
-1
votes
1 answer

C# WebClient Downloads empty file

I'm working on an app that uses Bing's API to search and download images. Bing's API provides a set of image links and I iterate over them and download each one. The problem that I'm having is that sometimes the downloaded file size is 0Kb. I assume…
Curtwagner1984
  • 1,908
  • 4
  • 30
  • 48
-2
votes
1 answer

Threaded DownloadFileAsync

I might be very stupid but how to solve the following? When I want to download many files I use a list of links and threaded WebClient.DownloadFileAsync. But I want my UI to be updated (ProgressBar) during the process so I used this answer to…
GeeMitchey
  • 134
  • 1
  • 3
  • 13
-4
votes
3 answers

How do I access a variable declared in one function from a second function?

I'm new to programming in C#, and im looking for a quick solution. I have 2 buttons on form, one is calling the DownloadFileAsync(), and the second one should cancel this operation. Code of first button: private void button1_Click(object sender,…
Tomasz Szymański
  • 1,445
  • 13
  • 17
1 2 3 4
5