3

ユーザーのプロファイルを読み込むために最新バージョンの TweetSharp を使用しています。まず、ListFollowerIdsForメソッドを使用してユーザーのすべてのフォロワーをロードします。その後、すべての ID を最大 100 個の ID のリストに分割します。

 
var ids = newUsersIds.Skip(i * 100).Take(100).Di​​stinct().ToList();
var users = service.ListUserProfilesFor(新しい ListUserProfilesForOptions { UserId = ids });

そして時々私StackoverflowExceptionはこの線に乗ります。コール スタックの最後の 2 行:

The thread '<No Name>' (0x17a0) has exited with code 0 (0x0).

A first chance exception of type 'System.Net.WebException' occurred in System.dll

再帰

    TweetSharp.dll!TweetSharp.JsonSerializer.DeserializeContent(string content, System.Type type) Line 168 + 0x1b bytes C#
    TweetSharp.dll!TweetSharp.JsonSerializer.DeserializeSingle(string content, System.Type type) Line 223 + 0x11 bytes  C#
    TweetSharp.dll!TweetSharp.JsonSerializer.DeserializeJson(string content, System.Type type) Line 41 + 0xe bytes  C#

どうすれば防ぐことができますか?

4

1 に答える 1

2

問題は、HTTP 500 エラー "Twitter over capacity" の処理にありました。Tweetsharp は、この状況で html ページをシリアライズしようとします。

于 2013-03-11T03:39:08.497 に答える