Exemplo n.º 1
0
        private static void UploadNewCertificate(UploadArgs uploadArgs)
        {
            var existingCert = GetExistingManagementCertificate(uploadArgs.SubscriptionId);
            if (existingCert == null)
            {
                Console.WriteLine("Cannot find existing mangement cert from Windows Azure Tools");
                return;
            }

            var status = UploadNewManagementCert(uploadArgs.SubscriptionId, existingCert, uploadArgs.CertificateFilePath);
            if (status == HttpStatusCode.Created)
            {
                Console.WriteLine("Uploaded certificate suceeded!");
            }
            else
            {
                Console.WriteLine("Upload certificate failed. Status: " + Enum.GetName(typeof(HttpStatusCode), status));
            }
        }
Exemplo n.º 2
0
        private static void UploadNewCertificate(UploadArgs uploadArgs)
        {
            var existingCert = GetExistingManagementCertificate(uploadArgs.SubscriptionId);

            if (existingCert == null)
            {
                Console.WriteLine("Cannot find existing mangement cert from Windows Azure Tools");
                return;
            }

            var status = UploadNewManagementCert(uploadArgs.SubscriptionId, existingCert, uploadArgs.CertificateFilePath);

            if (status == HttpStatusCode.Created)
            {
                Console.WriteLine("Uploaded certificate suceeded!");
            }
            else
            {
                Console.WriteLine("Upload certificate failed. Status: " + Enum.GetName(typeof(HttpStatusCode), status));
            }
        }