Replies: 1 comment 3 replies
-
In both cases it sounds like you've disposed the ProtocolLogger or the file stream or something. You'll have to paste your code. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm able to run the IMAPIdleExample.cs project downloaded from github as a console app and under a service background task. However, I'm not able to run it as part of a Windows form app.
The problem seems related to the ProtocolLogger. When I pass Console.StandardError to its constructor, I get an exception "The CancellationTokenSrource has been disposed" after client.AuthenticateAsync in ReconnectAsync.
When I pass a the name of a local file to the ProtocolLogger constructor, I get an exception "Cannot access a closed file" after client.ConnectAsync in ReconnectAsync. Note that I also use a local file in the console and service versions of the app and have no problems.
Environment: Windows 11 Pro, Visual Studio 2022 64-bit, .Net 6
Any advice would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions