Hi everybody,
I am working on a little application that is notified via streaming notifications when mails on exchange server arrive.
The whole notification system and mail processing works fine, but I have problems to handle errors if one occurs on the StreamingSubscriptionConnection or the exchange service itself.
The StreamingSubscriptionConnection provides the following events:
-OnDisconnect
-OnSubscriptionError
So far my understanding of these two events is:
OnDisconnect:
if the exception in the SubscriptionErrorEventArgs is null it is a expected and normal shutdown of the connection due to lifetime expiration. In this case a simply reopening call on the connection is enough to reestablish event notificaiton
if the exception is not null some major problem occured e.g. loss of internet connection (I especially want to consider that case). Currently I initialize the exchange server again, create a new subscription and also a new StreamingSubscriptionConnection when this case occures.
OnSubscriptionError:
Somehow the subscription information got lost. Its not enough to reopen the StreamingSubscriptionConnection (I ve tried it). One has to create a new subscription and init a new StreamingSubscriptionConnection with it.
Am I right so far?
Are there any cases where a combination of these events are fired? Have log entries all over the application. Sometimes both events are fired in a row and can t see a correlation why
regards