I created a console application to listen to an outgoing mailbox using an exchange server. When I send mail to a specific Outlook account, my application reads this mail and performs some business functions. Each functionality of this application works fine. But I ran into one problem: when the application has been running for a long time, for example, one day or more, I try to send mail. At that time, the application cannot handle this listening. An exception occurs. Unable to receive events for this subscription. Subscription must be recreated
How can I handle this situation? I think that this problem is associated not only with the exchange server, but also with the general problem when the application continues to work for a long time.
source share