Webclient downloadfileasync not working

Posted by Sandeep Bansal on Stack Overflow See other posts from Stack Overflow or by Sandeep Bansal
Published on 2010-03-23T01:01:18Z Indexed on 2010/03/23 1:41 UTC
Read the original article Hit count: 436

Filed under:
|
|

I got a WPF application and I want to download a file.

I'm using System.Net; and I have the following code:

WebClient ww = new WebClient();
ww.DownloadFileAsync(
    new Uri("http://www.sinvise.net/tester/1.jpg"), 
    AppDomain.CurrentDomain.BaseDirectory + "\\1.jpg");

The problem is, is that it doesn't download the file, it's just showing up as 0kb file and not downloading, I don't know what the problem is, can anyone help?

© Stack Overflow or respective owner

Related posts about c#

Related posts about webclient