XeroAPI/XeroAPI.Net — pull request #32 by Vinsight (2013-05-22 22:57:10+00:00)
Title: Better exception message around permissions on client SSL certificates

I was staring into the abyss about why I couldn't connect to Xero, and all I got was "Could not create SSL/TLS secure channel." as the error. After a lot of searching, I finally managed to fix it by setting the permissions on a certain certificate.

This changeset produces a much more detailed exception, that includes which certificate the issue is with, and even which user needs to be granted permission.

Hopefully it will save someone hours of frustration!

Example error:

The request was aborted: Could not create SSL/TLS secure channel. Check that "(process user)" has permission to read the following certificates: [name: "(common-name)", serial: "(serial)", thumbprint: "(thumbprint)"]