I tried following the example 2 in this article
https://technet.microsoft.com/en-us/library/hh918382.aspx?f=255&MSPPError=-2147217396
but I get an error saying that is not possible to convert system.object[] to System.security.cryptography.X509certificates.x509certificate2 type.
This happens because I have 4 CA root certificates in my store. How to solve this issue?