WebClient does not support concurrent I/O operations

前端 未结 4 2155
温柔的废话
温柔的废话 2020-11-30 09:45

How can I get this error from with in the DownloadStringCompleted Event? Doesn\'t that mean, it\'s finished? Is there another event I can fire this from?

I get this

4条回答
  •  半阙折子戏
    2020-11-30 10:23

    The WebClient only supports a single operations, it cannot download multiple files. You haven't shown your code, but my guess is that you are somehow firing a new request before the old is completed. My bet is that WebClient.IsBusy is true when you attempt to perform another fetch.

    See the following thread:

    wb.DownloadFileAsync throw "WebClient does not support concurrent I/O operations." exception

提交回复
热议问题