受信および送信されたすべての電子メールをローカル ドライブに保存する Windows サービスを作成し、サービスがそれを正常に実行しました。また、ストリーミング サブスクリプションの onDisconnect イベントと Onerror イベントも再サブスクライブしました。しかし、しばらくするとサービスが応答を停止し、例外はキャッチされません。私はすべてを適切に処理しましたが、他のフォーラムを見たところ、人々が直面している同じ問題が見つかりましたが、適切な解決策はありません。
static private void OnDisconnect(object sender, SubscriptionErrorEventArgs args)
{
try
{
// Cast the sender as a StreamingSubscriptionConnection object.
StreamingSubscriptionConnection connection = (StreamingSubscriptionConnection)sender;
if (!connection.IsOpen)
connection.Open();
}
static void OnError(object sender, SubscriptionErrorEventArgs args)
{
// Cast the sender as a StreamingSubscriptionConnection object.
StreamingSubscriptionConnection connection = (StreamingSubscriptionConnection)sender;
if (!connection.IsOpen)
connection.Open();
}
これは Microsoft のバグと関係がありますか、それとも EWS サブスクリプションの制限を変更するために Exchange サーバーの設定が必要ですか?
スロットリング制限に関連するものを以下でチェックしましたが、成功しませんでした: http://msdn.microsoft.com/en-us/library/exchange/hh881884(v=exchg.140).aspx
100 万前もって感謝します。