Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/AzureProvider.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/AzureProvider.cs	(revision 7338)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/AzureProvider.cs	(revision 7339)
@@ -44,4 +44,18 @@
       return ServiceManagementOperation.ListLocations(subscription.SubscriptionID, subscription.CertificateThumbprint);
     }
+
+    public List<HostedService> ListHostedServices(Subscription subscription) {
+      if (subscription == null) {
+        throw new ArgumentException("Subscription must not be null.", "subscription");
+      }
+      return ServiceManagementOperation.ListHostedServices(subscription.SubscriptionID, subscription.CertificateThumbprint);
+    }
+
+    public List<AffinityGroup> ListAffinityGroups(Subscription subscription) {
+      if (subscription == null) {
+        throw new ArgumentException("Subscription must not be null.", "subscription");
+      }
+      return ServiceManagementOperation.ListAffinityGroups(subscription.SubscriptionID, subscription.CertificateThumbprint);
+    }
   }
 }
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/IAzureProvider.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/IAzureProvider.cs	(revision 7338)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/IAzureProvider.cs	(revision 7339)
@@ -27,4 +27,7 @@
     Subscription GetSubscriptionInfo(string subscriptionId, string thumbprint);
     List<string> ListLocations(Subscription subscription);
+    List<HostedService> ListHostedServices(Subscription subscription);
+    List<AffinityGroup> ListAffinityGroups(Subscription subscription);
+
   }
 }
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs	(revision 7338)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/ServiceManagementOperation.cs	(revision 7339)
@@ -161,4 +161,162 @@
     }
 
+    public static Deployment GetDeployment(string subscriptionId, string thumbprint, string serviceName, string deploymentName) {
+      string uri = String.Format(Constants.URISpecificDeploymentFormat, subscriptionId, serviceName, deploymentName);
+      ServiceWebRequest operation = new ServiceWebRequest(thumbprint);
+      XDocument response = operation.Invoke(uri);
+      Deployment deployment = GetDeploymentFromXml(response.Root);
+      return deployment;
+    }
+
+    #endregion
+
+    #region Private Methods
+
+    private static int GetInstanceCount(XElement configuration, string roleName) {
+      XElement instanceElement = (from s in configuration.Elements(sh + "Role")
+                                  where s.Attribute("name").Value == roleName
+                                  select s.Element(sh + "Instances")).First();
+      int instanceCount = Convert.ToInt32(instanceElement.Attribute("count").Value);
+      return instanceCount;
+    }
+
+    private static void SetInstanceCount(XElement configuration, string roleName, int value) {
+      XElement instanceElement = (from s in configuration.Elements(sh + "Role")
+                                  where s.Attribute("name").Value == roleName
+                                  select s.Element(sh + "Instances")).First();
+      instanceElement.SetAttributeValue("count", value);
+    }
+
+    private static string CreateHostedService(string subscriptionId, string thumbprint, string serviceName, string label, string description, string location, string affinityGroup) {
+      string uri = string.Format(Constants.URIHostedServiceFormat, subscriptionId);
+      XDocument payload = CreateHostedServicePayload(serviceName, label, description, location, affinityGroup);
+      ServiceWebRequest operation = new ServiceWebRequest(thumbprint);
+      string requestId = operation.Invoke(uri, payload);
+      return requestId;
+    }
+
+    private static XDocument CreateHostedServicePayload(string serviceName, string label, string description, string location, string affinityGroup) {
+      string base64LabelName = Utils.ConvertToBase64String(label);
+      XElement xServiceName = new XElement(wa + "ServiceName", serviceName);
+      XElement xLabel = new XElement(wa + "Label", base64LabelName);
+      XElement xDescription = new XElement(wa + "Description", description);
+      XElement createHostedService = new XElement(wa + "CreateHostedService");
+      createHostedService.Add(xServiceName);
+      createHostedService.Add(xLabel);
+      createHostedService.Add(xDescription);
+
+      if (location != String.Empty) {
+        XElement xLocation = new XElement(wa + "Location", location);
+        createHostedService.Add(xLocation);
+      } else {
+        XElement xAffinityGroup = new XElement(wa + "AffinityGroup", affinityGroup);
+        createHostedService.Add(xAffinityGroup);
+      }
+
+      XDocument payload = new XDocument();
+      payload.Add(createHostedService);
+      payload.Declaration = new XDeclaration("1.0", "UTF-8", "no");
+
+      return payload;
+    }
+
+    private static XDocument CreateAddCertificatePayload(string certificateFilePath, string password) {
+      XElement xData = new XElement(wa + "Data", Convert.ToBase64String(File.ReadAllBytes(certificateFilePath)));
+      XElement xCertificateFormat = new XElement(wa + "CertificateFormat", "pfx");
+      XElement xPassword = new XElement(wa + "Password", password);
+
+      XElement addcert = new XElement(wa + "CertificateFile");
+      addcert.Add(xData);
+      addcert.Add(xCertificateFormat);
+      addcert.Add(xPassword);
+
+      XDocument payload = new XDocument();
+      payload.Add(addcert);
+      payload.Declaration = new XDeclaration("1.0", "UTF-8", "no");
+
+      return payload;
+    }
+
+    private static XDocument CreateDeploymentPayload(string deploymentName, string packageUrl, string pathToConfigurationFile, string label) {
+      string configurationFile = File.ReadAllText(pathToConfigurationFile);
+      XElement xConfig = XElement.Parse(configurationFile);
+      return CreateDeploymentPayload(deploymentName, packageUrl, xConfig, label);
+    }
+
+    private static XDocument CreateDeploymentPayload(string deploymentName, string packageUrl, XElement configuration, string label) {
+      string base64ConfigurationFile = Utils.ConvertToBase64String(configuration.ToString());
+      string base64Label = Utils.ConvertToBase64String(label);
+
+      XElement xName = new XElement(wa + "Name", deploymentName);
+      XElement xPackageUrl = new XElement(wa + "PackageUrl", packageUrl);
+      XElement xLabel = new XElement(wa + "Label", base64Label);
+      XElement xConfiguration = new XElement(wa + "Configuration", base64ConfigurationFile);
+      XElement xStartDeployment = new XElement(wa + "StartDeployment", "true");
+      XElement xTreatWarningsAsError = new XElement(wa + "TreatWarningsAsError", "false");
+
+      XElement createDeployment = new XElement(wa + "CreateDeployment");
+      createDeployment.Add(xName);
+      createDeployment.Add(xPackageUrl);
+      createDeployment.Add(xLabel);
+      createDeployment.Add(xConfiguration);
+      createDeployment.Add(xStartDeployment);
+      createDeployment.Add(xTreatWarningsAsError);
+
+      XDocument payload = new XDocument();
+      payload.Add(createDeployment);
+      payload.Declaration =
+      new XDeclaration("1.0", "UTF-8", "no");
+      return payload;
+    }
+
+    private static XElement LoadConfiguration(String subscriptionId, String thumbprint, String serviceName, String deploymentSlot) {
+      string uri = string.Format(Constants.URIDeploymentFormat, subscriptionId, serviceName, deploymentSlot);
+      ServiceWebRequest operation = new ServiceWebRequest(thumbprint);
+      XDocument deployment = operation.Invoke(uri);
+      string base64Configuration = deployment.Element(wa + "Deployment").Element(wa + "Configuration").Value;
+      string stringConfiguration = Utils.ConvertFromBase64String(base64Configuration);
+      XElement configuration = XElement.Parse(stringConfiguration);
+      return configuration;
+    }
+
+    private static string SaveConfiguration(String subscriptionId, String thumbprint, String serviceName, String deploymentSlot, XElement configuration) {
+      string uri = string.Format(Constants.URIDeploymentConfigurationFormat, subscriptionId, serviceName, deploymentSlot);
+      XDocument payload = CreateConfigurationPayload(configuration);
+      ServiceWebRequest operation = new ServiceWebRequest(thumbprint);
+      string requestId = operation.Invoke(uri, payload);
+      return requestId;
+    }
+
+    private static XDocument CreateConfigurationPayload(XElement configuration) {
+      string configurationString = configuration.ToString();
+      string base64Configuration = Utils.ConvertToBase64String(configurationString);
+
+      XElement xConfiguration = new XElement(wa + "Configuration", base64Configuration);
+      XElement xChangeConfiguration = new XElement(wa + "ChangeConfiguration", xConfiguration);
+
+      XDocument payload = new XDocument();
+      payload.Add(xChangeConfiguration);
+      payload.Declaration = new XDeclaration("1.0", "UTF-8", "no");
+
+      return payload;
+    }
+
+    private static XDocument GetConfigurationFromDeployment(string subscriptionId, string thumbprint, string serviceName, string deploymentName) {
+      Deployment deployment = GetDeployment(subscriptionId, thumbprint, serviceName, deploymentName);
+      XDocument config = XDocument.Parse(deployment.Configuration);
+      return config;
+    }
+
+    private static bool ContainsRoleNameInConfiguration(XDocument configuration, string roleName) {
+      if (configuration.Root.Name != sh + "ServiceConfiguration")
+        throw new ArgumentException("No valid configuration", "configuration");
+
+
+      IEnumerable<XElement> role = (from s in configuration.Root.Elements(sh + "Role")
+                                    where s.Attribute("name").Value == roleName
+                                    select s);
+      return role.Count() > 0;
+    }
+
     private static Deployment GetDeploymentFromXml(XElement xDeployment) {
       Deployment deployment = new Deployment();
@@ -214,156 +372,4 @@
     }
 
-
-
-    #endregion
-
-    #region Private Methods
-
-    private static int GetInstanceCount(XElement configuration, string roleName) {
-      XElement instanceElement = (from s in configuration.Elements(sh + "Role")
-                                  where s.Attribute("name").Value == roleName
-                                  select s.Element(sh + "Instances")).First();
-      int instanceCount = Convert.ToInt32(instanceElement.Attribute("count").Value);
-      return instanceCount;
-    }
-
-    private static void SetInstanceCount(XElement configuration, string roleName, int value) {
-      XElement instanceElement = (from s in configuration.Elements(sh + "Role")
-                                  where s.Attribute("name").Value == roleName
-                                  select s.Element(sh + "Instances")).First();
-      instanceElement.SetAttributeValue("count", value);
-    }
-
-    private static string CreateHostedService(string subscriptionId, string thumbprint, string serviceName, string label, string description, string location, string affinityGroup) {
-      string uri = string.Format(Constants.URIHostedServiceFormat, subscriptionId);
-      XDocument payload = CreateHostedServicePayload(serviceName, label, description, location, affinityGroup);
-      ServiceWebRequest operation = new ServiceWebRequest(thumbprint);
-      string requestId = operation.Invoke(uri, payload);
-      return requestId;
-    }
-
-    private static XDocument CreateHostedServicePayload(string serviceName, string label, string description, string location, string affinityGroup) {
-      string base64LabelName = Utils.ConvertToBase64String(label);
-      XElement xServiceName = new XElement(wa + "ServiceName", serviceName);
-      XElement xLabel = new XElement(wa + "Label", base64LabelName);
-      XElement xDescription = new XElement(wa + "Description", description);
-      XElement createHostedService = new XElement(wa + "CreateHostedService");
-      createHostedService.Add(xServiceName);
-      createHostedService.Add(xLabel);
-      createHostedService.Add(xDescription);
-
-      if (location != String.Empty) {
-        XElement xLocation = new XElement(wa + "Location", location);
-        createHostedService.Add(xLocation);
-      } else {
-        XElement xAffinityGroup = new XElement(wa + "AffinityGroup", affinityGroup);
-        createHostedService.Add(xAffinityGroup);
-      }
-
-      XDocument payload = new XDocument();
-      payload.Add(createHostedService);
-      payload.Declaration = new XDeclaration("1.0", "UTF-8", "no");
-
-      return payload;
-    }
-
-    private static XDocument CreateAddCertificatePayload(string certificateFilePath, string password) {
-      XElement xData = new XElement(wa + "Data", Convert.ToBase64String(File.ReadAllBytes(certificateFilePath)));
-      XElement xCertificateFormat = new XElement(wa + "CertificateFormat", "pfx");
-      XElement xPassword = new XElement(wa + "Password", password);
-
-      XElement addcert = new XElement(wa + "CertificateFile");
-      addcert.Add(xData);
-      addcert.Add(xCertificateFormat);
-      addcert.Add(xPassword);
-
-      XDocument payload = new XDocument();
-      payload.Add(addcert);
-      payload.Declaration = new XDeclaration("1.0", "UTF-8", "no");
-
-      return payload;
-    }
-
-    private static XDocument CreateDeploymentPayload(string deploymentName, string packageUrl, string pathToConfigurationFile, string label) {
-      string configurationFile = File.ReadAllText(pathToConfigurationFile);
-      XElement xConfig = XElement.Parse(configurationFile);
-      return CreateDeploymentPayload(deploymentName, packageUrl, xConfig, label);
-    }
-
-    private static XDocument CreateDeploymentPayload(string deploymentName, string packageUrl, XElement configuration, string label) {
-      string base64ConfigurationFile = Utils.ConvertToBase64String(configuration.ToString());
-      string base64Label = Utils.ConvertToBase64String(label);
-
-      XElement xName = new XElement(wa + "Name", deploymentName);
-      XElement xPackageUrl = new XElement(wa + "PackageUrl", packageUrl);
-      XElement xLabel = new XElement(wa + "Label", base64Label);
-      XElement xConfiguration = new XElement(wa + "Configuration", base64ConfigurationFile);
-      XElement xStartDeployment = new XElement(wa + "StartDeployment", "true");
-      XElement xTreatWarningsAsError = new XElement(wa + "TreatWarningsAsError", "false");
-
-      XElement createDeployment = new XElement(wa + "CreateDeployment");
-      createDeployment.Add(xName);
-      createDeployment.Add(xPackageUrl);
-      createDeployment.Add(xLabel);
-      createDeployment.Add(xConfiguration);
-      createDeployment.Add(xStartDeployment);
-      createDeployment.Add(xTreatWarningsAsError);
-
-      XDocument payload = new XDocument();
-      payload.Add(createDeployment);
-      payload.Declaration =
-      new XDeclaration("1.0", "UTF-8", "no");
-      return payload;
-    }
-
-    private static XElement LoadConfiguration(String subscriptionId, String thumbprint, String serviceName, String deploymentSlot) {
-      string uri = string.Format(Constants.URIDeploymentFormat, subscriptionId, serviceName, deploymentSlot);
-      ServiceWebRequest operation = new ServiceWebRequest(thumbprint);
-      XDocument deployment = operation.Invoke(uri);
-      string base64Configuration = deployment.Element(wa + "Deployment").Element(wa + "Configuration").Value;
-      string stringConfiguration = Utils.ConvertFromBase64String(base64Configuration);
-      XElement configuration = XElement.Parse(stringConfiguration);
-      return configuration;
-    }
-
-    private static string SaveConfiguration(String subscriptionId, String thumbprint, String serviceName, String deploymentSlot, XElement configuration) {
-      string uri = string.Format(Constants.URIDeploymentConfigurationFormat, subscriptionId, serviceName, deploymentSlot);
-      XDocument payload = CreateConfigurationPayload(configuration);
-      ServiceWebRequest operation = new ServiceWebRequest(thumbprint);
-      string requestId = operation.Invoke(uri, payload);
-      return requestId;
-    }
-
-    private static XDocument CreateConfigurationPayload(XElement configuration) {
-      string configurationString = configuration.ToString();
-      string base64Configuration = Utils.ConvertToBase64String(configurationString);
-
-      XElement xConfiguration = new XElement(wa + "Configuration", base64Configuration);
-      XElement xChangeConfiguration = new XElement(wa + "ChangeConfiguration", xConfiguration);
-
-      XDocument payload = new XDocument();
-      payload.Add(xChangeConfiguration);
-      payload.Declaration = new XDeclaration("1.0", "UTF-8", "no");
-
-      return payload;
-    }
-
-    private static XDocument GetConfigurationFromDeployment(string subscriptionId, string thumbprint, string serviceName, string deploymentName) {
-      //Deployment deployment = GetDeployment(subscriptionId, thumbprint, serviceName, deploymentName);
-      //XDocument config = XDocument.Parse(deployment.Configuration);
-      return null;//config;
-    }
-
-    private static bool ContainsRoleNameInConfiguration(XDocument configuration, string roleName) {
-      if (configuration.Root.Name != sh + "ServiceConfiguration")
-        throw new ArgumentException("No valid configuration", "configuration");
-
-
-      IEnumerable<XElement> role = (from s in configuration.Root.Elements(sh + "Role")
-                                    where s.Attribute("name").Value == roleName
-                                    select s);
-      return role.Count() > 0;
-    }
-
     #endregion
   }
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj	(revision 7338)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj	(revision 7339)
@@ -76,4 +76,16 @@
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <Compile Include="Views\AddAzureServiceDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Views\AddAzureServiceDialog.Designer.cs">
+      <DependentUpon>AddAzureServiceDialog.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Views\AddCertificate.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Views\AddCertificate.Designer.cs">
+      <DependentUpon>AddCertificate.cs</DependentUpon>
+    </Compile>
     <Compile Include="Views\AddSubscriptionDialog.cs">
       <SubType>Form</SubType>
@@ -160,4 +172,10 @@
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Views\AddAzureServiceDialog.resx">
+      <DependentUpon>AddAzureServiceDialog.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Views\AddCertificate.resx">
+      <DependentUpon>AddCertificate.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="Views\AddSubscriptionDialog.resx">
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs	(revision 7339)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs	(revision 7339)
@@ -0,0 +1,385 @@
+﻿namespace HeuristicLab.Clients.Hive.CloudManager.Views {
+  partial class AddAzureServiceDialog {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.label1 = new System.Windows.Forms.Label();
+      this.cmbChooseSubscription = new System.Windows.Forms.ComboBox();
+      this.label2 = new System.Windows.Forms.Label();
+      this.cmbChooseHostedService = new System.Windows.Forms.ComboBox();
+      this.gbNewHostedService = new System.Windows.Forms.GroupBox();
+      this.cmbAffinityGroup = new System.Windows.Forms.ComboBox();
+      this.cmbRegion = new System.Windows.Forms.ComboBox();
+      this.rbAffinitGroup = new System.Windows.Forms.RadioButton();
+      this.rbRegion = new System.Windows.Forms.RadioButton();
+      this.label6 = new System.Windows.Forms.Label();
+      this.label5 = new System.Windows.Forms.Label();
+      this.tbURLPrefix = new System.Windows.Forms.TextBox();
+      this.label4 = new System.Windows.Forms.Label();
+      this.tbServiceName = new System.Windows.Forms.TextBox();
+      this.label3 = new System.Windows.Forms.Label();
+      this.cbNewHostedService = new System.Windows.Forms.CheckBox();
+      this.label7 = new System.Windows.Forms.Label();
+      this.panelDeploymentOptions = new System.Windows.Forms.Panel();
+      this.rbDeployToStaging = new System.Windows.Forms.RadioButton();
+      this.rbDeployToProduction = new System.Windows.Forms.RadioButton();
+      this.btnAddCertificate = new System.Windows.Forms.Button();
+      this.label9 = new System.Windows.Forms.Label();
+      this.tbInstanceCount = new System.Windows.Forms.TextBox();
+      this.lblCores = new System.Windows.Forms.Label();
+      this.label10 = new System.Windows.Forms.Label();
+      this.progressBar = new System.Windows.Forms.ProgressBar();
+      this.btnOk = new System.Windows.Forms.Button();
+      this.btnCancel = new System.Windows.Forms.Button();
+      this.gbNewHostedService.SuspendLayout();
+      this.panelDeploymentOptions.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(12, 9);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(111, 13);
+      this.label1.TabIndex = 1;
+      this.label1.Text = "Choose a subscription";
+      // 
+      // cmbChooseSubscription
+      // 
+      this.cmbChooseSubscription.FormattingEnabled = true;
+      this.cmbChooseSubscription.Location = new System.Drawing.Point(15, 25);
+      this.cmbChooseSubscription.Name = "cmbChooseSubscription";
+      this.cmbChooseSubscription.Size = new System.Drawing.Size(471, 21);
+      this.cmbChooseSubscription.TabIndex = 2;
+      this.cmbChooseSubscription.SelectedValueChanged += new System.EventHandler(this.cmbChooseSubscription_SelectedValueChanged);
+      // 
+      // label2
+      // 
+      this.label2.AutoSize = true;
+      this.label2.Location = new System.Drawing.Point(12, 49);
+      this.label2.Name = "label2";
+      this.label2.Size = new System.Drawing.Size(124, 13);
+      this.label2.TabIndex = 5;
+      this.label2.Text = "Choose a hosted service";
+      // 
+      // cmbChooseHostedService
+      // 
+      this.cmbChooseHostedService.FormattingEnabled = true;
+      this.cmbChooseHostedService.Location = new System.Drawing.Point(15, 65);
+      this.cmbChooseHostedService.Name = "cmbChooseHostedService";
+      this.cmbChooseHostedService.Size = new System.Drawing.Size(471, 21);
+      this.cmbChooseHostedService.TabIndex = 6;
+      // 
+      // gbNewHostedService
+      // 
+      this.gbNewHostedService.Controls.Add(this.cmbAffinityGroup);
+      this.gbNewHostedService.Controls.Add(this.cmbRegion);
+      this.gbNewHostedService.Controls.Add(this.rbAffinitGroup);
+      this.gbNewHostedService.Controls.Add(this.rbRegion);
+      this.gbNewHostedService.Controls.Add(this.label6);
+      this.gbNewHostedService.Controls.Add(this.label5);
+      this.gbNewHostedService.Controls.Add(this.tbURLPrefix);
+      this.gbNewHostedService.Controls.Add(this.label4);
+      this.gbNewHostedService.Controls.Add(this.tbServiceName);
+      this.gbNewHostedService.Controls.Add(this.label3);
+      this.gbNewHostedService.Location = new System.Drawing.Point(15, 115);
+      this.gbNewHostedService.Name = "gbNewHostedService";
+      this.gbNewHostedService.Size = new System.Drawing.Size(469, 145);
+      this.gbNewHostedService.TabIndex = 7;
+      this.gbNewHostedService.TabStop = false;
+      this.gbNewHostedService.Text = "New hosted service";
+      // 
+      // cmbAffinityGroup
+      // 
+      this.cmbAffinityGroup.FormattingEnabled = true;
+      this.cmbAffinityGroup.Location = new System.Drawing.Point(267, 110);
+      this.cmbAffinityGroup.Name = "cmbAffinityGroup";
+      this.cmbAffinityGroup.Size = new System.Drawing.Size(194, 21);
+      this.cmbAffinityGroup.TabIndex = 9;
+      // 
+      // cmbRegion
+      // 
+      this.cmbRegion.FormattingEnabled = true;
+      this.cmbRegion.Location = new System.Drawing.Point(29, 110);
+      this.cmbRegion.Name = "cmbRegion";
+      this.cmbRegion.Size = new System.Drawing.Size(200, 21);
+      this.cmbRegion.TabIndex = 8;
+      // 
+      // rbAffinitGroup
+      // 
+      this.rbAffinitGroup.AutoSize = true;
+      this.rbAffinitGroup.Location = new System.Drawing.Point(247, 113);
+      this.rbAffinitGroup.Name = "rbAffinitGroup";
+      this.rbAffinitGroup.Size = new System.Drawing.Size(14, 13);
+      this.rbAffinitGroup.TabIndex = 7;
+      this.rbAffinitGroup.UseVisualStyleBackColor = true;
+      // 
+      // rbRegion
+      // 
+      this.rbRegion.AutoSize = true;
+      this.rbRegion.Checked = true;
+      this.rbRegion.Location = new System.Drawing.Point(9, 113);
+      this.rbRegion.Name = "rbRegion";
+      this.rbRegion.Size = new System.Drawing.Size(14, 13);
+      this.rbRegion.TabIndex = 6;
+      this.rbRegion.TabStop = true;
+      this.rbRegion.UseVisualStyleBackColor = true;
+      // 
+      // label6
+      // 
+      this.label6.AutoSize = true;
+      this.label6.Location = new System.Drawing.Point(6, 94);
+      this.label6.Name = "label6";
+      this.label6.Size = new System.Drawing.Size(159, 13);
+      this.label6.TabIndex = 5;
+      this.label6.Text = "Choose a region or affinity group";
+      // 
+      // label5
+      // 
+      this.label5.AutoSize = true;
+      this.label5.Location = new System.Drawing.Point(389, 74);
+      this.label5.Name = "label5";
+      this.label5.Size = new System.Drawing.Size(72, 13);
+      this.label5.TabIndex = 4;
+      this.label5.Text = ".cloudapp.net";
+      // 
+      // tbURLPrefix
+      // 
+      this.tbURLPrefix.Location = new System.Drawing.Point(9, 71);
+      this.tbURLPrefix.Name = "tbURLPrefix";
+      this.tbURLPrefix.Size = new System.Drawing.Size(377, 20);
+      this.tbURLPrefix.TabIndex = 3;
+      // 
+      // label4
+      // 
+      this.label4.AutoSize = true;
+      this.label4.Location = new System.Drawing.Point(6, 55);
+      this.label4.Name = "label4";
+      this.label4.Size = new System.Drawing.Size(169, 13);
+      this.label4.TabIndex = 2;
+      this.label4.Text = "Enter a URL prefix for your service";
+      // 
+      // tbServiceName
+      // 
+      this.tbServiceName.Location = new System.Drawing.Point(9, 32);
+      this.tbServiceName.Name = "tbServiceName";
+      this.tbServiceName.Size = new System.Drawing.Size(453, 20);
+      this.tbServiceName.TabIndex = 1;
+      // 
+      // label3
+      // 
+      this.label3.AutoSize = true;
+      this.label3.Location = new System.Drawing.Point(6, 16);
+      this.label3.Name = "label3";
+      this.label3.Size = new System.Drawing.Size(145, 13);
+      this.label3.TabIndex = 0;
+      this.label3.Text = "Enter a name for your service";
+      // 
+      // cbNewHostedService
+      // 
+      this.cbNewHostedService.AutoSize = true;
+      this.cbNewHostedService.Location = new System.Drawing.Point(15, 92);
+      this.cbNewHostedService.Name = "cbNewHostedService";
+      this.cbNewHostedService.Size = new System.Drawing.Size(152, 17);
+      this.cbNewHostedService.TabIndex = 8;
+      this.cbNewHostedService.Text = "Create new hosted service";
+      this.cbNewHostedService.UseVisualStyleBackColor = true;
+      this.cbNewHostedService.CheckedChanged += new System.EventHandler(this.cbNewHostedService_CheckedChanged);
+      // 
+      // label7
+      // 
+      this.label7.AutoSize = true;
+      this.label7.Location = new System.Drawing.Point(12, 263);
+      this.label7.Name = "label7";
+      this.label7.Size = new System.Drawing.Size(100, 13);
+      this.label7.TabIndex = 9;
+      this.label7.Text = "Deployment options";
+      // 
+      // panelDeploymentOptions
+      // 
+      this.panelDeploymentOptions.Controls.Add(this.rbDeployToProduction);
+      this.panelDeploymentOptions.Controls.Add(this.rbDeployToStaging);
+      this.panelDeploymentOptions.Location = new System.Drawing.Point(13, 280);
+      this.panelDeploymentOptions.Name = "panelDeploymentOptions";
+      this.panelDeploymentOptions.Size = new System.Drawing.Size(471, 49);
+      this.panelDeploymentOptions.TabIndex = 10;
+      // 
+      // rbDeployToStaging
+      // 
+      this.rbDeployToStaging.AutoSize = true;
+      this.rbDeployToStaging.Location = new System.Drawing.Point(0, 4);
+      this.rbDeployToStaging.Name = "rbDeployToStaging";
+      this.rbDeployToStaging.Size = new System.Drawing.Size(168, 17);
+      this.rbDeployToStaging.TabIndex = 0;
+      this.rbDeployToStaging.TabStop = true;
+      this.rbDeployToStaging.Text = "Deploy to staging environment";
+      this.rbDeployToStaging.UseVisualStyleBackColor = true;
+      // 
+      // rbDeployToProduction
+      // 
+      this.rbDeployToProduction.AutoSize = true;
+      this.rbDeployToProduction.Location = new System.Drawing.Point(0, 27);
+      this.rbDeployToProduction.Name = "rbDeployToProduction";
+      this.rbDeployToProduction.Size = new System.Drawing.Size(189, 17);
+      this.rbDeployToProduction.TabIndex = 1;
+      this.rbDeployToProduction.TabStop = true;
+      this.rbDeployToProduction.Text = "Deyploy to production environment";
+      this.rbDeployToProduction.UseVisualStyleBackColor = true;
+      // 
+      // btnAddCertificate
+      // 
+      this.btnAddCertificate.Location = new System.Drawing.Point(13, 336);
+      this.btnAddCertificate.Name = "btnAddCertificate";
+      this.btnAddCertificate.Size = new System.Drawing.Size(99, 23);
+      this.btnAddCertificate.TabIndex = 11;
+      this.btnAddCertificate.Text = "Add certificate";
+      this.btnAddCertificate.UseVisualStyleBackColor = true;
+      this.btnAddCertificate.Click += new System.EventHandler(this.btnAddCertificate_Click);
+      // 
+      // label9
+      // 
+      this.label9.AutoSize = true;
+      this.label9.Location = new System.Drawing.Point(10, 362);
+      this.label9.Name = "label9";
+      this.label9.Size = new System.Drawing.Size(167, 13);
+      this.label9.TabIndex = 12;
+      this.label9.Text = "How many cores should be used?";
+      // 
+      // tbInstanceCount
+      // 
+      this.tbInstanceCount.Location = new System.Drawing.Point(13, 378);
+      this.tbInstanceCount.Name = "tbInstanceCount";
+      this.tbInstanceCount.Size = new System.Drawing.Size(469, 20);
+      this.tbInstanceCount.TabIndex = 13;
+      // 
+      // lblCores
+      // 
+      this.lblCores.AutoSize = true;
+      this.lblCores.Location = new System.Drawing.Point(452, 361);
+      this.lblCores.Name = "lblCores";
+      this.lblCores.Size = new System.Drawing.Size(30, 13);
+      this.lblCores.TabIndex = 14;
+      this.lblCores.Text = "0 / 0";
+      // 
+      // label10
+      // 
+      this.label10.AutoSize = true;
+      this.label10.Location = new System.Drawing.Point(417, 361);
+      this.label10.Name = "label10";
+      this.label10.Size = new System.Drawing.Size(40, 13);
+      this.label10.TabIndex = 15;
+      this.label10.Text = "Cores: ";
+      // 
+      // progressBar
+      // 
+      this.progressBar.Location = new System.Drawing.Point(13, 404);
+      this.progressBar.MarqueeAnimationSpeed = 10;
+      this.progressBar.Name = "progressBar";
+      this.progressBar.Size = new System.Drawing.Size(307, 23);
+      this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
+      this.progressBar.TabIndex = 16;
+      // 
+      // btnOk
+      // 
+      this.btnOk.Location = new System.Drawing.Point(326, 404);
+      this.btnOk.Name = "btnOk";
+      this.btnOk.Size = new System.Drawing.Size(75, 23);
+      this.btnOk.TabIndex = 17;
+      this.btnOk.Text = "OK";
+      this.btnOk.UseVisualStyleBackColor = true;
+      this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+      // 
+      // btnCancel
+      // 
+      this.btnCancel.Location = new System.Drawing.Point(407, 404);
+      this.btnCancel.Name = "btnCancel";
+      this.btnCancel.Size = new System.Drawing.Size(75, 23);
+      this.btnCancel.TabIndex = 18;
+      this.btnCancel.Text = "Cancel";
+      this.btnCancel.UseVisualStyleBackColor = true;
+      this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+      // 
+      // AddAzureServiceDialog
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(496, 436);
+      this.Controls.Add(this.lblCores);
+      this.Controls.Add(this.btnCancel);
+      this.Controls.Add(this.btnOk);
+      this.Controls.Add(this.progressBar);
+      this.Controls.Add(this.label10);
+      this.Controls.Add(this.tbInstanceCount);
+      this.Controls.Add(this.label9);
+      this.Controls.Add(this.btnAddCertificate);
+      this.Controls.Add(this.panelDeploymentOptions);
+      this.Controls.Add(this.label7);
+      this.Controls.Add(this.cbNewHostedService);
+      this.Controls.Add(this.gbNewHostedService);
+      this.Controls.Add(this.cmbChooseHostedService);
+      this.Controls.Add(this.label2);
+      this.Controls.Add(this.cmbChooseSubscription);
+      this.Controls.Add(this.label1);
+      this.Name = "AddAzureServiceDialog";
+      this.Text = "Create New Azure Slave";
+      this.gbNewHostedService.ResumeLayout(false);
+      this.gbNewHostedService.PerformLayout();
+      this.panelDeploymentOptions.ResumeLayout(false);
+      this.panelDeploymentOptions.PerformLayout();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.ComboBox cmbChooseSubscription;
+    private System.Windows.Forms.Label label2;
+    private System.Windows.Forms.ComboBox cmbChooseHostedService;
+    private System.Windows.Forms.GroupBox gbNewHostedService;
+    private System.Windows.Forms.ComboBox cmbAffinityGroup;
+    private System.Windows.Forms.ComboBox cmbRegion;
+    private System.Windows.Forms.RadioButton rbAffinitGroup;
+    private System.Windows.Forms.RadioButton rbRegion;
+    private System.Windows.Forms.Label label6;
+    private System.Windows.Forms.Label label5;
+    private System.Windows.Forms.TextBox tbURLPrefix;
+    private System.Windows.Forms.Label label4;
+    private System.Windows.Forms.TextBox tbServiceName;
+    private System.Windows.Forms.Label label3;
+    private System.Windows.Forms.CheckBox cbNewHostedService;
+    private System.Windows.Forms.Label label7;
+    private System.Windows.Forms.Panel panelDeploymentOptions;
+    private System.Windows.Forms.RadioButton rbDeployToProduction;
+    private System.Windows.Forms.RadioButton rbDeployToStaging;
+    private System.Windows.Forms.Button btnAddCertificate;
+    private System.Windows.Forms.Label label9;
+    private System.Windows.Forms.TextBox tbInstanceCount;
+    private System.Windows.Forms.Label lblCores;
+    private System.Windows.Forms.Label label10;
+    private System.Windows.Forms.ProgressBar progressBar;
+    private System.Windows.Forms.Button btnOk;
+    private System.Windows.Forms.Button btnCancel;
+  }
+}
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs	(revision 7339)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs	(revision 7339)
@@ -0,0 +1,130 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Windows.Forms;
+using HeuristicLab.Clients.Hive.CloudManager.Model;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Clients.Hive.CloudManager.Views {
+  public partial class AddAzureServiceDialog : Form {
+    private BindingList<Subscription> subscriptions;
+    private BindingList<HostedService> hostedServices;
+    private BindingList<string> locations;
+    private BindingList<AffinityGroup> affinityGroups;
+
+    private BackgroundWorker worker = new BackgroundWorker();
+
+    public AddAzureServiceDialog(IItemList<Subscription> subs) {
+      InitializeComponent();
+
+      this.subscriptions = new BindingList<Subscription>(subs);
+
+      SetLookupBinding(cmbChooseSubscription, subscriptions, "SubscriptionName", "SubscriptionID");
+      SetLookupBinding(cmbChooseHostedService, hostedServices, "ServiceName", "ServiceName");
+      SetLookupBinding(cmbRegion, locations, "", "");
+      SetLookupBinding(cmbAffinityGroup, affinityGroups, "Label", "Name");
+
+      if (!cbNewHostedService.Checked) {
+        SetGroupBoxControlsEnabled(gbNewHostedService, cbNewHostedService.Checked);
+      }
+
+      worker.DoWork += new DoWorkEventHandler(UpdateTask);
+      worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(WorkerCompleted);
+    }
+
+    private void SetLookupBinding(ListControl toBind, object dataSource, string displayMember, string valueMember) {
+      toBind.DisplayMember = displayMember;
+      toBind.ValueMember = valueMember;
+      toBind.DataSource = dataSource;
+    }
+
+    private void SetGroupBoxControlsEnabled(GroupBox gb, bool isEnabled) {
+      foreach (Control ctrl in gb.Controls) {
+        ctrl.Enabled = isEnabled;
+      }
+    }
+
+    private void SetAllControlsEnabled(Form frm, bool isEnabled) {
+      foreach (Control ctrl in frm.Controls) {
+        if (!(ctrl is ProgressBar)) {
+          this.Invoke((MethodInvoker)delegate { ctrl.Enabled = isEnabled; });
+        }
+      }
+    }
+
+    private void SetBindingList<T>(ref BindingList<T> bindinglist, List<T> list) {
+      if (list != null) {
+        BindingList<T> newList = new BindingList<T>(list);
+        bindinglist = newList;
+      }
+    }
+
+    private void cbNewHostedService_CheckedChanged(object sender, EventArgs e) {
+      if (cbNewHostedService.Checked) {
+        Subscription subscription = (Subscription)cmbChooseSubscription.SelectedItem;
+        if (subscription.CurrentHostedServices == subscription.MaxHostedServices) {
+          MessageBox.Show("You have already created the maximum number of hosted services", "Limit Reached", MessageBoxButtons.OK, MessageBoxIcon.Error);
+          cbNewHostedService.Checked = false;
+        } else {
+          SetGroupBoxControlsEnabled(gbNewHostedService, cbNewHostedService.Checked);
+          cmbChooseHostedService.Enabled = false;
+        }
+      } else {
+        // checked == false
+        SetGroupBoxControlsEnabled(gbNewHostedService, false);
+        if (hostedServices == null) {
+          cbNewHostedService.Checked = true;
+        }
+      }
+    }
+
+    private void cmbChooseSubscription_SelectedValueChanged(object sender, EventArgs e) {
+      Subscription item = (Subscription)cmbChooseSubscription.SelectedItem;
+      if (item != null) {
+        progressBar.Visible = true;
+        worker.RunWorkerAsync(item);
+      }
+    }
+
+    private void btnAddCertificate_Click(object sender, EventArgs e) {
+      using (var form = new AddCertificate()) {
+        form.ShowDialog();
+        Debug.WriteLine("End - AddCertificateDialog");
+      }
+    }
+
+    private void btnCancel_Click(object sender, EventArgs e) {
+      this.Close();
+    }
+
+    private void btnOk_Click(object sender, EventArgs e) {
+      if (cmbChooseSubscription.SelectedItem != null) {
+        // TODO
+      }
+    }
+
+    private void UpdateTask(object sender, DoWorkEventArgs e) {
+      try {
+        SetAllControlsEnabled(this, false);
+
+        Subscription item = (Subscription)e.Argument;
+        item = CloudManagerClient.Instance.AzureProvider.GetSubscriptionInfo(item.SubscriptionID, item.CertificateThumbprint);
+        this.Invoke((MethodInvoker)delegate { lblCores.Text = item.CurrentCoreCount + " / " + item.MaxCoreCount; });
+
+        SetBindingList<HostedService>(ref hostedServices, CloudManagerClient.Instance.AzureProvider.ListHostedServices(item));
+        SetBindingList<string>(ref locations, CloudManagerClient.Instance.AzureProvider.ListLocations(item));
+        SetBindingList<AffinityGroup>(ref affinityGroups, CloudManagerClient.Instance.AzureProvider.ListAffinityGroups(item));
+
+        SetAllControlsEnabled(this, true);
+      }
+      catch (Exception ex) {
+        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+      }
+    }
+
+    private void WorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
+      this.Invoke((MethodInvoker)delegate { progressBar.Visible = false; });
+    }
+  }
+}
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddCertificate.Designer.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddCertificate.Designer.cs	(revision 7339)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddCertificate.Designer.cs	(revision 7339)
@@ -0,0 +1,141 @@
+﻿namespace HeuristicLab.Clients.Hive.CloudManager.Views {
+  partial class AddCertificate {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.label1 = new System.Windows.Forms.Label();
+      this.tbCertificateFile = new System.Windows.Forms.TextBox();
+      this.btnBrowseCertificateFile = new System.Windows.Forms.Button();
+      this.label8 = new System.Windows.Forms.Label();
+      this.tbCertificatePassword = new System.Windows.Forms.TextBox();
+      this.progressBar = new System.Windows.Forms.ProgressBar();
+      this.btnOk = new System.Windows.Forms.Button();
+      this.btnCancel = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(12, 9);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(70, 13);
+      this.label1.TabIndex = 2;
+      this.label1.Text = "Certificate file";
+      // 
+      // tbCertificateFile
+      // 
+      this.tbCertificateFile.Location = new System.Drawing.Point(15, 25);
+      this.tbCertificateFile.Name = "tbCertificateFile";
+      this.tbCertificateFile.ReadOnly = true;
+      this.tbCertificateFile.Size = new System.Drawing.Size(388, 20);
+      this.tbCertificateFile.TabIndex = 3;
+      // 
+      // btnBrowseCertificateFile
+      // 
+      this.btnBrowseCertificateFile.Location = new System.Drawing.Point(409, 25);
+      this.btnBrowseCertificateFile.Name = "btnBrowseCertificateFile";
+      this.btnBrowseCertificateFile.Size = new System.Drawing.Size(75, 23);
+      this.btnBrowseCertificateFile.TabIndex = 5;
+      this.btnBrowseCertificateFile.Text = "Browse ...";
+      this.btnBrowseCertificateFile.UseVisualStyleBackColor = true;
+      this.btnBrowseCertificateFile.Click += new System.EventHandler(this.btnBrowseCertificateFile_Click);
+      // 
+      // label8
+      // 
+      this.label8.AutoSize = true;
+      this.label8.Location = new System.Drawing.Point(12, 48);
+      this.label8.Name = "label8";
+      this.label8.Size = new System.Drawing.Size(53, 13);
+      this.label8.TabIndex = 6;
+      this.label8.Text = "Password";
+      // 
+      // tbCertificatePassword
+      // 
+      this.tbCertificatePassword.Location = new System.Drawing.Point(15, 64);
+      this.tbCertificatePassword.Name = "tbCertificatePassword";
+      this.tbCertificatePassword.PasswordChar = '*';
+      this.tbCertificatePassword.Size = new System.Drawing.Size(469, 20);
+      this.tbCertificatePassword.TabIndex = 7;
+      // 
+      // progressBar
+      // 
+      this.progressBar.Location = new System.Drawing.Point(15, 90);
+      this.progressBar.MarqueeAnimationSpeed = 10;
+      this.progressBar.Name = "progressBar";
+      this.progressBar.Size = new System.Drawing.Size(307, 23);
+      this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
+      this.progressBar.TabIndex = 32;
+      this.progressBar.Visible = false;
+      // 
+      // btnOk
+      // 
+      this.btnOk.Location = new System.Drawing.Point(328, 90);
+      this.btnOk.Name = "btnOk";
+      this.btnOk.Size = new System.Drawing.Size(75, 23);
+      this.btnOk.TabIndex = 31;
+      this.btnOk.Text = "OK";
+      this.btnOk.UseVisualStyleBackColor = true;
+      this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+      // 
+      // btnCancel
+      // 
+      this.btnCancel.Location = new System.Drawing.Point(409, 90);
+      this.btnCancel.Name = "btnCancel";
+      this.btnCancel.Size = new System.Drawing.Size(75, 23);
+      this.btnCancel.TabIndex = 30;
+      this.btnCancel.Text = "Cancel";
+      this.btnCancel.UseVisualStyleBackColor = true;
+      this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+      // 
+      // AddCertificate
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(499, 126);
+      this.Controls.Add(this.progressBar);
+      this.Controls.Add(this.btnOk);
+      this.Controls.Add(this.btnCancel);
+      this.Controls.Add(this.tbCertificatePassword);
+      this.Controls.Add(this.label8);
+      this.Controls.Add(this.btnBrowseCertificateFile);
+      this.Controls.Add(this.tbCertificateFile);
+      this.Controls.Add(this.label1);
+      this.Name = "AddCertificate";
+      this.Text = "AddCertificate";
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.TextBox tbCertificateFile;
+    private System.Windows.Forms.Button btnBrowseCertificateFile;
+    private System.Windows.Forms.Label label8;
+    private System.Windows.Forms.TextBox tbCertificatePassword;
+    private System.Windows.Forms.ProgressBar progressBar;
+    private System.Windows.Forms.Button btnOk;
+    private System.Windows.Forms.Button btnCancel;
+  }
+}
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddCertificate.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddCertificate.cs	(revision 7339)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddCertificate.cs	(revision 7339)
@@ -0,0 +1,70 @@
+﻿using System;
+using System.ComponentModel;
+using System.Threading;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Clients.Hive.CloudManager.Views {
+  public partial class AddCertificate : Form {
+    private BackgroundWorker worker = new BackgroundWorker();
+    public bool ErrorOccured { get; set; }
+
+    public AddCertificate() {
+      InitializeComponent();
+      worker.DoWork += new DoWorkEventHandler(AddCertificateTask);
+      worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(WorkerCompleted);
+    }
+
+    private void btnBrowseCertificateFile_Click(object sender, EventArgs e) {
+      OpenFileDialog ofd = new OpenFileDialog();
+      ofd.Filter = "All Certificate Files|*.pfx";
+      if (ofd.ShowDialog() == DialogResult.OK) {
+        tbCertificateFile.Text = ofd.FileName;
+      }
+    }
+
+    private void btnCancel_Click(object sender, EventArgs e) {
+      this.Close();
+    }
+
+    private void btnOk_Click(object sender, EventArgs e) {
+      if (tbCertificateFile.Text.Length == 0) {
+        MessageBox.Show("Certificate file is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+      } else if (tbCertificatePassword.Text.Length == 0) {
+        MessageBox.Show("Password is required", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+      } else {
+        SetControlsEnabled(false);
+        progressBar.Visible = true;
+        worker.RunWorkerAsync();
+      }
+
+    }
+
+    private void SetControlsEnabled(bool isEnabled) {
+      tbCertificatePassword.Enabled = isEnabled;
+      btnBrowseCertificateFile.Enabled = isEnabled;
+      btnCancel.Enabled = isEnabled;
+      btnOk.Enabled = isEnabled;
+    }
+
+    private void AddCertificateTask(object sender, DoWorkEventArgs e) {
+      try {
+        // simulate service call
+        Thread.Sleep(3000);
+      }
+      catch (Exception ex) {
+        ErrorOccured = true;
+        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+      }
+    }
+
+    private void WorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
+      progressBar.Visible = false;
+      if (!ErrorOccured) {
+        this.Close();
+      } else {
+        this.Show();
+        SetControlsEnabled(true);
+      }
+    }
+  }
+}
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.Designer.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.Designer.cs	(revision 7338)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.Designer.cs	(revision 7339)
@@ -92,4 +92,5 @@
       this.btnAddSlaveService.TabIndex = 2;
       this.btnAddSlaveService.UseVisualStyleBackColor = true;
+      this.btnAddSlaveService.Click += new System.EventHandler(this.btnAddSlaveService_Click);
       // 
       // btnAddSubscription
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.cs	(revision 7338)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/CloudResourcesView.cs	(revision 7339)
@@ -138,4 +138,11 @@
       }
     }
+
+    private void btnAddSlaveService_Click(object sender, EventArgs e) {
+      using (var form = new AddAzureServiceDialog(Content)) {
+        form.ShowDialog();
+
+      }
+    }
   }
 }
