问题是,如果我这样做Webclient.DownloadStringAsync(Uri)
,而 Uri.length 很长,我会看到错误:An exception occurred during a WebClient request
Webclient 的 URI 是对链接长度的限制吗?如果链接很长怎么办?
WebClient queueItem_client = new WebClient();
queueItem_client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(queueItem_client_DownloadStringCompleted);
queueItem_client.DownloadStringAsync(execUri);
void queueItem_client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{}
链接长度为execUri
2234 个字符。
如果execUri
由大约 500 个字符组成,则正常响应。