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 7551)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs	(revision 7565)
@@ -328,5 +328,5 @@
       // 
       this.lblCertificateFile.AutoSize = true;
-      this.lblCertificateFile.Location = new System.Drawing.Point(118, 341);
+      this.lblCertificateFile.Location = new System.Drawing.Point(120, 605);
       this.lblCertificateFile.Name = "lblCertificateFile";
       this.lblCertificateFile.Size = new System.Drawing.Size(0, 13);
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 7551)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs	(revision 7565)
@@ -2,4 +2,6 @@
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.IO;
+using System.Net;
 using System.Text.RegularExpressions;
 using System.Windows.Forms;
@@ -171,24 +173,52 @@
           bool newHostedServiceChecked = cbNewHostedService.Checked;
           bool regionChecked = rbRegion.Checked;
+          HostedService hostedService = null;
+          if (cbNewHostedService.Checked) {
+            hostedService = new HostedService();
+            hostedService.ServiceName = tbServiceName.Text;
+            HostedServiceProperties properties = new HostedServiceProperties();
+
+            if (regionChecked) {
+              properties.AffinityGroup = string.Empty;
+              properties.Location = (string)cmbLocation.SelectedItem;
+            } else {
+              properties.AffinityGroup = ((AffinityGroup)cmbAffinityGroup.SelectedItem).Name;
+              properties.Location = string.Empty;
+            }
+
+            if (cmbAffinityGroup.SelectedItem != null) {
+              properties.AffinityGroup = ((AffinityGroup)cmbAffinityGroup.SelectedItem).Name;
+            }
+            properties.Label = tbLabel.Text;
+            properties.Location = (string)cmbLocation.SelectedItem;
+            hostedService.HostedServiceProperties = properties;
+          } else {
+            hostedService = (HostedService)cmbChooseHostedService.SelectedItem;
+          }
+
+
           string certFile = certificateFile;
           string certPw = certificatePassword;
           int instanceCount = Convert.ToInt32(tbInstanceCount.Text);
-          HostedService hostedService = new HostedService();
-          hostedService.ServiceName = tbServiceName.Text;
-          HostedServiceProperties properties = new HostedServiceProperties();
-          if (regionChecked) {
-            properties.AffinityGroup = string.Empty;
-            properties.Location = (string)cmbLocation.SelectedItem;
-          } else {
-            properties.AffinityGroup = ((AffinityGroup)cmbAffinityGroup.SelectedItem).Name;
-            properties.Location = string.Empty;
+
+
+
+          string packagefilepath = string.Empty;
+          if (rbVMSizeSmall.Checked) {
+            packagefilepath = Constants.DeploymentPackagePathSmall;
+          } else if (rbVMSizeMedium.Checked) {
+            packagefilepath = Constants.DeploymentPackagePathMedium;
+          } else if (rbVMSizeLarge.Checked) {
+            packagefilepath = Constants.DeploymentPackagePathLarge;
+          } else if (rbVMSizeExtraLarge.Checked) {
+            packagefilepath = Constants.DeploymentPackagePathExtraLarge;
           }
 
-          if (cmbAffinityGroup.SelectedItem != null) {
-            properties.AffinityGroup = ((AffinityGroup)cmbAffinityGroup.SelectedItem).Name;
+          string deploymentSlot = string.Empty;
+          if (rbDeployToProduction.Checked) {
+            deploymentSlot = Constants.DeploymentSlotProduction;
+          } else if (rbDeployToStaging.Checked) {
+            deploymentSlot = Constants.DeploymentSlotStaging;
           }
-          properties.Label = tbLabel.Text;
-          properties.Location = (string)cmbLocation.SelectedItem;
-          hostedService.HostedServiceProperties = properties;
 
           //var parameters1 = Tuple.Create<Subscription, bool, bool, string, string, HostedService, int>
@@ -203,5 +233,8 @@
           parameters.InstanceCount = instanceCount;
           parameters.StorageService = (StorageService)cmbStorageServices.SelectedItem;
+          parameters.CreateContainerIfNotExists = cbCreateBlobIfNotExists.Checked;
           parameters.BlobContainerName = tbBlobContainer.Text;
+          parameters.DeploymentPackageFilePath = packagefilepath;
+          parameters.DeploymentSlot = deploymentSlot;
 
           bwCompleted = false;
@@ -258,12 +291,16 @@
       string blobContainerName = parameters.BlobContainerName;
       bool createContainerIfNotExists = parameters.CreateContainerIfNotExists;
-
-      CloudStorageAccount storageAccount;
-      CloudBlobClient blobClient;
-      CloudBlobContainer blobContainer;
+      string packageFilePath = parameters.DeploymentPackageFilePath;
+      FileInfo packageFile = new FileInfo(packageFilePath);
+      string deploymentSlot = parameters.DeploymentSlot;
+
+      int defaultCollectionLimit = ServicePointManager.DefaultConnectionLimit;
+
+      CloudStorageAccount storageAccount = null; ;
+      CloudBlobClient blobClient = null;
+      CloudBlobContainer blobContainer = null;
 
       // STEP 1 - Initialize storage account
       try {
-        // get access key to storage service
         StorageServiceKeys keys = CloudManagerClient.Instance.AzureProvider.GetStorageKeys(sub, storageService.ServiceName);
         storageAccount = CloudStorageAccount.Parse(string.Format(Constants.StorageServiceConnectionFormat, storageService.ServiceName, keys.Primary));
@@ -283,4 +320,19 @@
       }
 
+      // STEP 2 - Copy service package file to storage account
+      CloudBlockBlob blobPackage = null;
+      try {
+        blobPackage = blobContainer.GetBlockBlobReference(packageFile.Name);
+        if (!blobPackage.Exists()) {
+          ServicePointManager.DefaultConnectionLimit = 64;
+          blobPackage.UploadParallel(packageFile.FullName);
+        }
+
+      }
+      catch (Exception ex) {
+        errorOccured = true;
+        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+      }
+
 
       // STEP 1 - Create Hosted Service
@@ -317,5 +369,6 @@
       try {
         if (!errorOccured) {
-          CloudManagerClient.Instance.AzureProvider.CreateDeployment(sub, hostedService.ServiceName, Guid.NewGuid().ToString(), Constants.DeploymentSlotStaging, Constants.DeploymentPackageUrl, Constants.DeploymentConfigurationUrl, Constants.DeploymentLabel, instanceCount);
+          //CloudManagerClient.Instance.AzureProvider.CreateDeployment(sub, hostedService.ServiceName, Guid.NewGuid().ToString(), Constants.DeploymentSlotStaging, Constants.DeploymentPackageUrl, Constants.DeploymentConfigurationUrl, Constants.DeploymentLabel, instanceCount);
+          CloudManagerClient.Instance.AzureProvider.CreateDeployment(sub, hostedService.ServiceName, Guid.NewGuid().ToString(), deploymentSlot, blobPackage.Uri.ToString(), new FileInfo(Constants.DeploymentConfigurationPath), Constants.DeploymentLabel, instanceCount);
         }
       }
@@ -328,4 +381,5 @@
       }
 
+      ServicePointManager.DefaultConnectionLimit = defaultCollectionLimit;
       e.Result = errorOccured;
     }
@@ -403,6 +457,6 @@
         if (instanceCount > subscription.MaxCoreCount - subscription.CurrentCoreCount) {
           errorProvider.SetError(tbInstanceCount, "Instance count must be less or equal than the difference between maximum and available cores.");
+          e.Cancel = true;
         } else {
-          e.Cancel = true;
           errorProvider.SetError(tbInstanceCount, "");
         }
@@ -464,4 +518,6 @@
       public string BlobContainerName { get; set; }
       public bool CreateContainerIfNotExists { get; set; }
+      public string DeploymentPackageFilePath { get; set; }
+      public string DeploymentSlot { get; set; }
     }
   }
