现在我正在处理我的第一个 Windows Mobile 项目,但我遇到了一个奇怪的问题。
我正在使用WebRequest
从 Internet 下载一些图像 - 在我的移动设备上它可以工作,但在调试器中我有套接字异常。
string url = "http://new.meteo.pl/um/metco/mgram_pict.php?ntype=0u&fdate=2010011006&row=381&col=199&lang=pl";
Stream stream = null;
WebRequest requestPic = WebRequest.Create(url);
WebResponse responsePic = requestPic.GetResponse();
stream = responsePic.GetResponseStream();
return new System.Drawing.Bitmap(stream);
输出:
A first chance exception of type 'System.Net.WebException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
The thread 0x167c46f6 has exited with code 0 (0x0).
如何强制我的本地实例获取此图像?