I use the Microsoft Exchange Web Services 1.1 SDK and use a streaming connection to sign up for a new email notification. Everything works fine for receiving notifications, but I get errors from time to time that my Exchange could not find my subscription.
Below is the code that I use to initialize my subscription and the events I use.
public void Subscribe() { var locateMailbox = new Mailbox { Address = "myemail" }; var folderId = new FolderId(WellKnownFolderName.Inbox, locateMailbox); var foldersToWatch = new[] {folderId}; StreamingSubscription streamingSubscription = _exchangeService.SubscribeToStreamingNotifications(foldersToWatch, EventType.NewMail);
ServiceLocalException - You must add at least one subscription to this connection before it can be opened.
This exception speaks for itself, and I know that I can just create another subscription inside Reconnect() . I hope someone can help me figure out where the subscription goes. I canβt imagine that a product like Exchange 2010 will simply lose my subscription. In addition, I cannot indicate an error. Sometimes I can keep my subscription active for 10 minutes, and sometimes I get a message that my subscription is not valid after 2-3 minutes.
Why use Exchange 2010 SP1.
source share