I'm downloading many files with webclient.downloadfileasync. I have set the maximumconnection to 10, so only 10 files can be downloaded at the same time. Sometimes files are missing from the otherside. When that happens, DownloadFileAsync just waits for the missing files to be downloaded(I don't know how long). I want to set a time limit so if the file downloading is not progressed for longer than 30 seconds, it should be canceled so it can move on to downloading the other files.
What should I do?
Dim wc As WebClient = New WebClient
wc.DownloadFileAsync(Ur1, localFL)
AddHandler wc.DownloadProgressChanged, Sub(sender As Object, e As DownloadProgressChangedEventArgs)
I have no idea after this. I think I should set up a 30sec timer somehow for each downloadfileasync and wc.abort() if it DLprogresschanged is false for 30 sec but I have no idea about how to do that. Please help me.