6

ここに画像の説明を入力

このWebサービスをasp.netプロジェクトに統合しようとしましたが、そのようなタイプのエラーがポップアップします! これについて何か考えがある場合は、親切に解決策を教えてください。oodle Web サービスと oodle API に関する非常にまれな資料があります。

この URL を試して、私の問題について詳しく理解して ください http://api.oodle.com/api/v2/listings?key=TEST®ion=chicago&category=vehicle/car

4

2 に答える 2

4
try
    {
        string url = @"http://api.oodle.com/api/v2/listings?key=TEST&region=chicago";

        WebClient webClient = new WebClient();
        webClient.Encoding = Encoding.UTF8;
        string result = webClient.DownloadString(url);

       }
  catch (Exception ex)
    {
        Response.Write(ex.ToString());

    }

このステートメントは例外を作成します

   string result = webClient.DownloadString(url);

および例外の詳細は

   System.Net.WebException: Unable to connect to the remote server ---> 
System.Net.Sockets.SocketException: A connection attempt failed because the connected 
party did not properly respond after a period of time, or established connection failed 
because connected host has failed to respond 192.168.0.101:808 at 
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress 
socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, 
Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, 
IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception 
stack trace --- at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& 
request) at System.Net.WebClient.DownloadString(Uri address) at 
System.Net.WebClient.DownloadString(String address) at _Default.lnkGoTo_Click(Object 
sender, EventArgs e) in d:\MyDemoz\oodleDemo\Default.aspx.cs:line 58 
于 2012-01-31T11:39:52.107 に答える