0

現在、最初のWindows Mobileプロジェクトで作業していますが、奇妙な問題があります。インターネットからいくつかの画像をダウンロードするため
に使用WebRequestしています。モバイルでは機能しますが、デバッガーではソケットの例外があります。

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).

ローカルインスタンスにこの画像を取得させる方法は?

4

1 に答える 1

1

デバイスエミュレータを使用している場合は、ネットワーク情報を設定するだけです。

また、外部と接続できることを確認してください(ネットワークインフラストラクチャによっては接続できない場合があります)。

于 2010-01-10T16:42:01.890 に答える