現在、Exchange Web サービスに関連する問題のトラブルシューティングを行っています。問題は、(StreamingSubscriptionConnection オブジェクトを介して) ストリーミング サブスクリプションへの接続を開くと、Open メソッドを呼び出すときに操作がハングすることです。参照用に、ハングするコードを次に示します。
_streamingSubscriptionConnection = new StreamingSubscriptionConnection(_exchangeService, _connectionLifetime);
_streamingSubscriptionConnection.AddSubscription(_subscription);
_streamingSubscriptionConnection.OnNotificationEvent += new StreamingSubscriptionConnection.NotificationEventDelegate(OnNotificationEvent);
_streamingSubscriptionConnection.OnSubscriptionError += new StreamingSubscriptionConnection.SubscriptionErrorDelegate(OnSubscriptionError);
_streamingSubscriptionConnection.OnDisconnect += new StreamingSubscriptionConnection.SubscriptionErrorDelegate(OnDisconnect);
_streamingSubscriptionConnection.Open();
通常は約 2 分かかりServiceRequestException
、メッセージが次のようにスローされます。
リクエストは失敗しました。操作がタイムアウトしました。
また、タイムアウトを 1 分に設定しても、1 分以上かかり、この例外がスローされることにも注意してください。呼び出しがその Open コマンドを通過することはありません。
私の質問は、過去に誰かがこれに出くわしたことがありますか? さらに、接続の問題を診断して、例外が自分の側にあるのか、Exchange サーバー側にあるのか、またはその中間にあるのかを判断するために使用できるツールはありますか? Fiddler と Microsoft Network Monitor を使用してパターンを探してみましたが、何かを識別するのに苦労しています。
前もって感謝します!
編集:これに追加するために、トレースリスナーを追加すると、かなり多くの出力が得られます。サブスクリプション ID を取得してから接続を試みることがわかります。接続要求を送信すると、Open コマンドが発行されてからタイムアウトまでの間に次のように記録されます。
<Trace Tag="EwsRequestHttpHeaders" Tid="10" Time="2013-01-24 19:16:18Z">
POST /ews/exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/14.03.0032.000
Accept-Encoding: gzip,deflate
</Trace>
<Trace Tag="EwsRequest" Tid="10" Time="2013-01-24 19:16:18Z" Version="14.03.0032.000">
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP1" />
</soap:Header>
<soap:Body>
<m:GetStreamingEvents>
<m:SubscriptionIds>
<t:SubscriptionId>GABsdGNmaXN3bXNnY2EwNi5mbmZpcy5jb20QAAAAnQCowdNSt0iTEhqVr8+a1GPHu2t+yM8I</t:SubscriptionId>
</m:SubscriptionIds>
<m:ConnectionTimeout>30</m:ConnectionTimeout>
</m:GetStreamingEvents>
</soap:Body>
</soap:Envelope>
</Trace>
ネットワークの問題を除外しようとしていますが、そうするのに少し苦労しています。この時点で、どんなアドバイスでも大歓迎です。