0

I'm doing an auto-update program and I get this error:

An unhandled exception of type enter System.NotSupportedException occurred in System.dll

Additional information: WebClient does not support concurrent I/O operations.

Code:

Public Sub getUpdate()
    If System.IO.File.Exists(tool) Then
        System.IO.File.Delete(tool)
        wClinet.DownloadFileAsync(New Uri("https://www.dropbox.com/sh/hqkne9iz2p6rr86/AABT-iipKShPynlasYK6VVSGa?dl=1"), directorypath + ("\KingdomGaming.exe"))
        Timer1.Start()
    Else
        System.IO.File.Delete(tool)
        wClinet.DownloadFileAsync(New Uri("https://www.dropbox.com/sh/hqkne9iz2p6rr86/AABT-iipKShPynlasYK6VVSGa?dl=1"), directorypath + ("\KingdomGaming.exe"))
        Timer1.Start()
    End If
End Sub
Blackwood
  • 4,504
  • 16
  • 32
  • 41
pepe25
  • 1
  • 2
  • Are you trying to download multiple files at the same time using one instance of `WebClient`? If so, `WebClient` doesn't support that. Check [this question](https://stackoverflow.com/q/9765109/4934172). – 41686d6564 stands w. Palestine May 15 '18 at 19:20
  • nope **I'm not**. I'm using just this. – pepe25 May 15 '18 at 19:38
  • In this case, please [edit](https://stackoverflow.com/posts/50357366/edit) your question and include a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) that shows the life cycle of your `wClinet` variable and tell us exactly which line causes this exception. Also, if `Timer1` uses `wClinet` in any way, include that as well. – 41686d6564 stands w. Palestine May 15 '18 at 19:41

0 Answers0