title: X509Certificate2 Import PathTooLongException: The specified path, file name, or both are too long
body: <p>I am trying to import a X509Certificate2 from a base64string and getting exception "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters". Can you kindly help as to what this exception means.</p>
  
  <pre><code> var pfx = certficatestring;          
  
   var bytes = Encoding.UTF32.GetBytes(pfx);
   var certdata = Convert.ToBase64String(bytes);
  
   X509Certificate2 x509 = new X509Certificate2();
   x509.Import(certdata,password,X509KeyStorageFlags.Exportable);
   return x509;
  </code></pre>