title: PKCS12 Client Certificate in C# with BouncyCastle
body: <p>I need to use a certificate client .pkcs12 for a windows phone application.
  I can't use X509Certificate class because PKCS12 is not allowed. So I download the BouncyCastle class and make this </p>
  
  <pre><code>try
  {
      FileStream Cert = new FileStream 
                             ("certificate.pkcs12",FileMode.Open,FileAccess.Read);
      char[] password = new char[] { 'p','a','s','s','w','o','r','d' };
      Pkcs12Store certificate = new Pkcs12Store(Cert,password);
  }     
  catch (Exception e)
  {
      Console.WriteLine(e.Message);
   }
  </code></pre>
  
  <p>I obtain this exception:</p>
  
  <pre><code> {System.TypeInitializationException: 
     The type initializer for 'Org.BouncyCastle.Asn1.Pkcs.PkcsObjectIdentifiers' 
      threw an exception. ---&gt;
       System.IO.FileNotFoundException: Could not load file or assembly 
  </code></pre>