Used to encapsulate a .cscfg file and be able to pull properties from it
Inheritance: ConfigurationFile
 /// <summary>
 /// Constructs a SetDeploymenConfigurationCommand command
 /// </summary>
 // POST https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deploymentslots/<deployment-slot>/?comp=config
 internal SetDeploymenConfigurationCommand(string serviceName, CscfgFile config, DeploymentSlot slot = DeploymentSlot.Production)
 {
     // need to increment the version in this request otherwise will not be able to check vm instances
     AdditionalHeaders["x-ms-version"] = "2012-03-01";
     OperationId = "hostedservices";
     ServiceType = "services";
     HttpCommand = (CloudServiceName = serviceName) + "/deploymentslots/" + (Slot = slot).ToString().ToLower() + "/?comp=config";
     Configuration = config;
     HttpVerb = HttpVerbPost;
 }
Exemplo n.º 2
0
        public ServiceCertificate CreateServiceCertificateAndAddRemoteDesktop(string username, string password, ref CscfgFile file)
        {
            var certificate = new ServiceCertificate(username, password);
            certificate.Create();

            var desktop = new RemoteDesktop(certificate)
                              {
                                  Username = username,
                                  Password = password
                              };
            file.NewVersion = ((ICloudConfig) desktop).ChangeConfig(file.NewVersion);
            return certificate;
        }