ツイートをマップ上に表示し、センチメント API を使用してツイートを分析する Silverlight Web アプリケーションを開発しています。センチメント API を 3、4 週間問題なく使用できました。その後、センチメント API を呼び出した後に TargetInvocationException が発生することがありました。
ここで、センチメント API をどんどん呼び出すと、TargetInvocationException に直面します。
XDocument newdoc = XDocument.Parse(en.Result);
en.Result が null になり、
例外が表示されます:
System.Reflection.TargetInvocatinException : 操作中に例外が発生したため、結果が無効になりました。例外の詳細については、InnerExceptionon を確認してください。---> System.Net.WebException: リモート サーバーがエラーを返しました: NotFound ---> System.Net.WebException : リモート サーバーがエラーを返しました: NotFound。System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult ayncResult) at System.Net.Browser.BrowserHttpWebRequest.<>c_DisplalyClass4.b__1(Object sendState) ---System.Net.Browser.AsyncHelper での内部例外スタック トレースの終わり。 System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult ayncResult) での BeginOnUI (SendOrPostCallback beginMethod、オブジェクト状態) System.Net.WebClient.GetWebResponse(WebRequest、IAsyncResult 結果) で System.Net.WebClient.