This project is read-only.

Problem connecting using mono

Topics: Help requests
Feb 8, 2014 at 9:07 PM
I have a windows compiled binary that is connecting fine (gmail / ssl ) that is failing to even connect when run under mono. The client.Connect() call returns false. What is the easiest way to get more information on why it is failing to connect? Both machines are on the same lan so I doubt there is an actual networking issue (they can both ping/make connections)? I tried setting IsDebug to true but didn't get any additional information,

Feb 8, 2014 at 10:36 PM
Hi Darren,

thank you! I will check the mono version and if cannot reproduce the issue, will prepare a special sample application for you.


Feb 8, 2014 at 11:14 PM
This may be an issue with SSL certificates.

This may be useful:
Feb 8, 2014 at 11:30 PM
That's a good point!
ImapX allows to bypass certificate validation, use the following code:
// SSL, default port (993) for connection, disable certificate validation
var client = new ImapClient("", true, false); 
Feb 16, 2014 at 1:40 AM
A belated thanks for the tips. The code I was developing had to go into production for the tech search party last Saturday night in Noe Valley and given the time constraints I ran it off a windows laptop but I had some time to go back and test this weekend and indeed, either disabling certificate checking as suggested, or following the mono-project FAQ and running mozroots --import in the linux account running the client resolved the issues. That's a nice trap for the unwary but the key phrase in the FAQ which stands out is "Note that a default installation of Mono doesn't trust anyone!" which makes running an SSL connection tough. The mono error message might have been a little more friendly but lesson learned.

Pavel, I processed a few hundred documents with image attachments for that event and found a few that broke ImapX. Will send details in a separate email, but it mostly performed admirably