Office365 new message problem

Jun 30 at 9:18 AM
I have a problem when using an office365 address.
I see in the logs it logs in to office and sees the emails but when a new one comes it crashes the socket or the new message arrived function is not triggered not sure why, here are both logs, socket and imapx log.
Thank you.

---ImapX log
  • CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
    IMAPX1 OK CAPABILITY completed.
    IMAPX2 LOGIN "xxx@office365.com" "password"
IMAPX2 OK LOGIN completed.
IMAPX3 LIST "" %
  • LIST (\HasNoChildren) "/" Archive
  • LIST (\HasChildren) "/" Calendar
  • LIST (\HasChildren) "/" Contacts
  • LIST (\HasNoChildren) "/" "Conversation History"
  • LIST (\HasChildren \Trash) "/" "Deleted Items"
  • LIST (\HasNoChildren \Drafts) "/" Drafts
  • LIST (\Marked \HasNoChildren) "/" INBOX
  • LIST (\HasNoChildren) "/" Journal
  • LIST (\HasNoChildren \Junk) "/" "Junk Email"
  • LIST (\HasNoChildren) "/" Notes
  • LIST (\HasNoChildren) "/" Outbox
  • LIST (\HasNoChildren) "/" "RSS Feeds"
  • LIST (\HasNoChildren \Sent) "/" "Sent Items"
  • LIST (\HasNoChildren) "/" "Suggested Contacts"
  • LIST (\HasChildren) "/" "Sync Issues"
  • LIST (\HasNoChildren) "/" Tasks
    IMAPX3 OK LIST completed.
    IMAPX4 EXAMINE "Archive"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 143] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX4 OK [READ-ONLY] EXAMINE completed.
    IMAPX5 EXAMINE "Calendar"
  • 11 EXISTS
  • 11 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 15] UIDVALIDITY value
  • OK [UIDNEXT 28] The next unique identifier value
    IMAPX5 OK [READ-ONLY] EXAMINE completed.
    IMAPX6 LIST "Calendar/" %
  • LIST (\HasNoChildren) "/" Calendar/Birthdays
  • LIST (\HasNoChildren) "/" "Calendar/United States holidays"
    IMAPX6 OK LIST completed.
    IMAPX7 EXAMINE "Calendar/Birthdays"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 97] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX7 OK [READ-ONLY] EXAMINE completed.
    IMAPX8 EXAMINE "Calendar/United States holidays"
  • 161 EXISTS
  • 161 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 98] UIDVALIDITY value
  • OK [UIDNEXT 163] The next unique identifier value
    IMAPX8 OK [READ-ONLY] EXAMINE completed.
    IMAPX9 EXAMINE "Contacts"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 16] UIDVALIDITY value
  • OK [UIDNEXT 32] The next unique identifier value
    IMAPX9 OK [READ-ONLY] EXAMINE completed.
    IMAPX10 LIST "Contacts/" %
IMAPX10 OK LIST completed.
IMAPX11 EXAMINE "Conversation History"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 104] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX11 OK [READ-ONLY] EXAMINE completed.
    IMAPX12 EXAMINE "Deleted Items"
  • 5 EXISTS
  • 5 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 12] UIDVALIDITY value
  • OK [UIDNEXT 10] The next unique identifier value
    IMAPX12 OK [READ-ONLY] EXAMINE completed.
    IMAPX13 LIST "Deleted Items/" %
  • LIST (\HasNoChildren) "/" "Deleted Items/MyFolder"
    IMAPX13 OK LIST completed.
    IMAPX14 EXAMINE "Deleted Items/MyFolder"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 155] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX14 OK [READ-ONLY] EXAMINE completed.
    IMAPX15 EXAMINE "Drafts"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 17] UIDVALIDITY value
  • OK [UIDNEXT 2] The next unique identifier value
    IMAPX15 OK [READ-ONLY] EXAMINE completed.
    IMAPX16 EXAMINE "INBOX"
  • 72 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UNSEEN 60] Is the first unseen message
  • OK [UIDVALIDITY 14] UIDVALIDITY value
  • OK [UIDNEXT 1122] The next unique identifier value
    IMAPX16 OK [READ-ONLY] EXAMINE completed.
    IMAPX17 EXAMINE "Journal"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 18] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX17 OK [READ-ONLY] EXAMINE completed.
    IMAPX18 EXAMINE "Junk Email"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 38] UIDVALIDITY value
  • OK [UIDNEXT 5] The next unique identifier value
    IMAPX18 OK [READ-ONLY] EXAMINE completed.
    IMAPX19 EXAMINE "Notes"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 19] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX19 OK [READ-ONLY] EXAMINE completed.
    IMAPX20 EXAMINE "Outbox"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 13] UIDVALIDITY value
  • OK [UIDNEXT 7] The next unique identifier value
    IMAPX20 OK [READ-ONLY] EXAMINE completed.
    IMAPX21 EXAMINE "RSS Feeds"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 138] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX21 OK [READ-ONLY] EXAMINE completed.
    IMAPX22 EXAMINE "Sent Items"
  • 3 EXISTS
  • 3 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 11] UIDVALIDITY value
  • OK [UIDNEXT 10] The next unique identifier value
    IMAPX22 OK [READ-ONLY] EXAMINE completed.
    IMAPX23 EXAMINE "Suggested Contacts"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 124] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX23 OK [READ-ONLY] EXAMINE completed.
    IMAPX24 EXAMINE "Sync Issues"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 120] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX24 OK [READ-ONLY] EXAMINE completed.
    IMAPX25 LIST "Sync Issues/" %
  • LIST (\HasNoChildren) "/" "Sync Issues/Conflicts"
  • LIST (\HasNoChildren) "/" "Sync Issues/Local Failures"
  • LIST (\HasNoChildren) "/" "Sync Issues/Server Failures"
    IMAPX25 OK LIST completed.
    IMAPX26 EXAMINE "Sync Issues/Conflicts"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 121] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX26 OK [READ-ONLY] EXAMINE completed.
    IMAPX27 EXAMINE "Sync Issues/Local Failures"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 122] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX27 OK [READ-ONLY] EXAMINE completed.
    IMAPX28 EXAMINE "Sync Issues/Server Failures"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 123] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX28 OK [READ-ONLY] EXAMINE completed.
    IMAPX29 EXAMINE "Tasks"
  • 0 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS ()] Permanent flags
  • OK [UIDVALIDITY 20] UIDVALIDITY value
  • OK [UIDNEXT 1] The next unique identifier value
    IMAPX29 OK [READ-ONLY] EXAMINE completed.
    IMAPX30 SELECT "INBOX"
  • 72 EXISTS
  • 0 RECENT
  • FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
  • OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags
  • OK [UNSEEN 60] Is the first unseen message
  • OK [UIDVALIDITY 14] UIDVALIDITY value
  • OK [UIDNEXT 1122] The next unique identifier value
    IMAPX30 OK [READ-WRITE] SELECT completed.
    IMAPX31 IDLE
IDLE accepted, awaiting DONE command.
1 RECENT
73 EXISTS
DONE

MAPX31 OK IDLE completed.
IMAPX33 STATUS "INBOX" (UIDNEXT)
  • STATUS INBOX (UIDNEXT 1122)
    IMAPX33 OK STATUS completed.
    IMAPX34 IDLE
IDLE accepted, awaiting DONE command.
2 RECENT
74 EXISTS
DONE

MAPX34 OK IDLE completed.
IMAPX36 STATUS "INBOX" (UIDNEXT)
  • STATUS INBOX (UIDNEXT 1122)
    IMAPX36 OK STATUS completed.
    IMAPX37 IDLE
IDLE accepted, awaiting DONE command.
3 RECENT
75 EXISTS
DONE

MAPX37 OK IDLE completed.
IMAPX39 STATUS "INBOX" (UIDNEXT)
  • STATUS INBOX (UIDNEXT 1122)
    IMAPX39 OK STATUS completed.
    IMAPX40 IDLE
IDLE accepted, awaiting DONE command.
4 RECENT
76 EXISTS
DONE

MAPX40 OK IDLE completed.
IMAPX42 STATUS "INBOX" (UIDNEXT)
  • STATUS INBOX (UIDNEXT 1122)
    IMAPX42 OK STATUS completed.
    IMAPX43 IDLE
IDLE accepted, awaiting DONE command.
5 RECENT
77 EXISTS
DONE

MAPX43 OK IDLE completed.
IMAPX45 STATUS "INBOX" (UIDNEXT)
  • STATUS INBOX (UIDNEXT 1122)
    IMAPX45 OK STATUS completed.
    IMAPX46 IDLE
IDLE accepted, awaiting DONE command.
6 RECENT
78 EXISTS
DONE

MAPX46 OK IDLE completed.
IMAPX48 STATUS "INBOX" (UIDNEXT)
  • STATUS INBOX (UIDNEXT 1122)
    IMAPX48 OK STATUS completed.
    IMAPX49 IDLE
IDLE accepted, awaiting DONE command.
Jun 30 at 9:19 AM
Second Log----
ERROR2017-06-29 04:04:18 – System.Net.Sockets.SocketException (0x80004005): A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied
at ImapX.ImapBase.SendAndReceive(String command, IList1& data, CommandProcessor processor, Encoding encoding, Boolean pushResultToDatadespiteProcessor)
at ImapX.Folder.Examine()
at ImapX.ImapClient.GetFolders(String path, CommonFolderCollection commonFolders, Folder parent, Boolean isFirstLevel)
at ImapX.ImapClient.GetFolders()
at ImapX.ImapClient.get_Folders()
at ionProjects.ionBiz.BusinessServices.Core.ImapManagerService.StartIdling(Action
2 onNewMessagesArrived, Action2 onIdlePaused, Action2 onIdleStopped) in C:\work\ionProjects.ionBiz\Dev\NewDesign\Sources\ionBiz\Business Services\ionProjects.ionBiz.BusinessServices.Core\ImapManagerService.cs:line 50
at ionProjects.ionBiz.BusinessServices.Core.ImportService.StartIdlingMailboxForIssues() in C:\work\ionProjects.ionBiz\Dev\NewDesign\Sources\ionBiz\Business Services\ionProjects.ionBiz.BusinessServices.Core\ImportService.cs:line 610
at ionProjects.ionBiz.BusinessServices.Core.Facade.ImportFacade.<StartIdlingMailboxForIssues>b__1b(IImportService s) in C:\work\ionProjects.ionBiz\Dev\NewDesign\Sources\ionBiz\Business Services\ionProjects.ionBiz.BusinessServices.Core.Facade\ImportFacade.cs:line 95
at ionProjects.ionBiz.BusinessServices.Core.Facade.BaseFacade.Call[T](T service, Action1 operation, CommitType commitType) in C:\work\ionProjects.ionBiz\Dev\NewDesign\Sources\ionBiz\Business Services\ionProjects.ionBiz.BusinessServices.Core.Facade\BaseFacade.cs:line 79
ERROR2017-06-29 04:04:18 – System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadLine()
at ImapX.ImapBase.SendAndReceive(String command, IList
1& data, CommandProcessor processor, Encoding encoding, Boolean pushResultToDatadespiteProcessor)
at ImapX.Folder.Examine()
at ImapX.ImapClient.GetFolders(String path, CommonFolderCollection commonFolders, Folder parent, Boolean isFirstLevel)
at ImapX.ImapClient.GetFolders()
at ImapX.ImapClient.get_Folders()
at ionProjects.ionBiz.BusinessServices.Core.ImapManagerService.StartIdling(Action2 onNewMessagesArrived, Action2 onIdlePaused, Action2 onIdleStopped) in C:\work\ionProjects.ionBiz\Dev\NewDesign\Sources\ionBiz\Business Services\ionProjects.ionBiz.BusinessServices.Core\ImapManagerService.cs:line 50
at ionProjects.ionBiz.BusinessServices.Core.ImportService.StartIdlingMailboxForIssues() in C:\work\ionProjects.ionBiz\Dev\NewDesign\Sources\ionBiz\Business Services\ionProjects.ionBiz.BusinessServices.Core\ImportService.cs:line 610
at ionProjects.ionBiz.BusinessServices.Core.Facade.ImportFacade.<StartIdlingMailboxForIssues>b__1b(IImportService s) in C:\work\ionProjects.ionBiz\Dev\NewDesign\Sources\ionBiz\Business Services\ionProjects.ionBiz.BusinessServices.Core.Facade\ImportFacade.cs:line 95
at ionProjects.ionBiz.BusinessServices.Core.Facade.BaseFacade.Call[T](T service, Action
1 operation, CommitType commitType) in C:\work\ionProjects.ionBiz\Dev\NewDesign\Sources\ionBiz\Business Services\ionProjects.ionBiz.BusinessServices.Core.Facade\BaseFacade.cs:line 79