Looking at the documentation, DownloadFile()
is synchronous, so there is no callback needed. Try instead just:
using (var client = new WebClient())
{
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(DownloadFileCompleted);
client.DownloadFile("https://www.apachelounge.com/download/VC15/binaries/httpd-2.4.29-Win64-VC15.zip", "web/data/main/web.zip");
ZipFile.ExtractToDirectory("web/data/main/web.zip", "web/");
}
This should suffice.
solved Download Complete event handler is not being called