private void UploadCertificate(X509Certificate2 cert, ConfigCertificate certElement, string name)
 {
     try
     {
         var createParams = new ServiceCertificateCreateParameters
         {
             Data              = cert.Export(X509ContentType.Pfx, string.Empty),
             Password          = string.Empty,
             CertificateFormat = CertificateFormat.Pfx
         };
         TranslateException(() => ComputeClient.ServiceCertificates.Create(name, createParams));
     }
     catch (CryptographicException ex)
     {
         throw new ArgumentException(string.Format(
                                         Resources.CertificatePrivateKeyAccessError,
                                         certElement.name), ex);
     }
 }
        private void UploadCertificate(X509Certificate2 cert, ConfigCertificate certElement, string name)
        {
            try
            {
                var createParams = new ServiceCertificateCreateParameters
                {
                    Data = cert.Export(X509ContentType.Pfx, string.Empty),
                    Password = string.Empty,
                    CertificateFormat = CertificateFormat.Pfx
                };
                TranslateException(() => ComputeClient.ServiceCertificates.Create(name, createParams));

            }
            catch (CryptographicException ex)
            {
                throw new ArgumentException(string.Format(
                    Resources.CertificatePrivateKeyAccessError,
                    certElement.name), ex);                
            }
        }