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 7423)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Azure/AzureProvider.cs	(revision 7424)
@@ -67,6 +67,8 @@
       foreach (HostedService serv in services) {
         serv.Subscription = subscription;
-        foreach (Deployment dep in serv.Deployments) {
-          dep.Subscription = subscription;
+        if (serv.Deployments != null) {
+          foreach (Deployment dep in serv.Deployments) {
+            dep.Subscription = subscription;
+          }
         }
       }
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 7423)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj	(revision 7424)
@@ -76,4 +76,5 @@
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <Compile Include="Validation.cs" />
     <Compile Include="Views\AddAzureServiceDialog.cs">
       <SubType>Form</SubType>
Index: /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Validation.cs
===================================================================
--- /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Validation.cs	(revision 7424)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Validation.cs	(revision 7424)
@@ -0,0 +1,83 @@
+﻿using System;
+using System.ComponentModel;
+using System.Reflection;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Clients.Hive.CloudManager {
+  // for more info see: http://stackoverflow.com/questions/769184/winform-ui-validation
+  public class Validation {
+    public static bool hasValidationErrors(System.Windows.Forms.Control.ControlCollection controls) {
+      bool hasError = false;
+
+      // Now we need to loop through the controls and deterime if any of them have errors
+      foreach (Control control in controls) {
+        // check the control and see what it returns
+        bool validControl = IsValid(control);
+        // If it's not valid then set the flag and keep going.  We want to get through all
+        // the validators so they will display on the screen if errorProviders were used.
+        if (!validControl)
+          hasError = true;
+
+        // If its a container control then it may have children that need to be checked
+        if (control.HasChildren) {
+          if (hasValidationErrors(control.Controls))
+            hasError = true;
+        }
+      }
+      return hasError;
+    }
+
+    // Here, let's determine if the control has a validating method attached to it
+    // and if it does, let's execute it and return the result
+    private static bool IsValid(object eventSource) {
+      string name = "EventValidating";
+
+      Type targetType = eventSource.GetType();
+
+      do {
+        FieldInfo[] fields = targetType.GetFields(
+             BindingFlags.Static |
+             BindingFlags.Instance |
+             BindingFlags.NonPublic);
+
+        foreach (FieldInfo field in fields) {
+          if (field.Name == name) {
+            EventHandlerList eventHandlers = ((EventHandlerList)(eventSource.GetType().GetProperty("Events",
+                (BindingFlags.FlattenHierarchy |
+                (BindingFlags.NonPublic | BindingFlags.Instance))).GetValue(eventSource, null)));
+
+            Delegate d = eventHandlers[field.GetValue(eventSource)];
+
+            if ((!(d == null))) {
+              Delegate[] subscribers = d.GetInvocationList();
+
+              // ok we found the validation event,  let's get the event method and call it
+              foreach (Delegate d1 in subscribers) {
+                // create the parameters
+                object sender = eventSource;
+                CancelEventArgs eventArgs = new CancelEventArgs();
+                eventArgs.Cancel = false;
+                object[] parameters = new object[2];
+                parameters[0] = sender;
+                parameters[1] = eventArgs;
+                // call the method
+                d1.DynamicInvoke(parameters);
+                // if the validation failed we need to return that failure
+                if (eventArgs.Cancel)
+                  return false;
+                else
+                  return true;
+              }
+            }
+          }
+        }
+
+        targetType = targetType.BaseType;
+
+      } while (targetType != null);
+
+      return true;
+    }
+
+  }
+}
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 7423)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.Designer.cs	(revision 7424)
@@ -24,4 +24,5 @@
     /// </summary>
     private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
       this.label1 = new System.Windows.Forms.Label();
       this.cmbChooseSubscription = new System.Windows.Forms.ComboBox();
@@ -53,6 +54,8 @@
       this.btnCancel = new System.Windows.Forms.Button();
       this.lblCertificateFile = new System.Windows.Forms.Label();
+      this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
       this.gbNewHostedService.SuspendLayout();
       this.panelDeploymentOptions.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
       this.SuspendLayout();
       // 
@@ -171,4 +174,5 @@
       this.tbServiceName.Size = new System.Drawing.Size(377, 20);
       this.tbServiceName.TabIndex = 3;
+      this.tbServiceName.Validating += new System.ComponentModel.CancelEventHandler(this.tbServiceName_Validating);
       // 
       // label4
@@ -187,4 +191,5 @@
       this.tbLabel.Size = new System.Drawing.Size(453, 20);
       this.tbLabel.TabIndex = 1;
+      this.tbLabel.Validating += new System.ComponentModel.CancelEventHandler(this.tbLabel_Validating);
       // 
       // label3
@@ -330,8 +335,13 @@
       this.lblCertificateFile.TabIndex = 19;
       // 
+      // errorProvider
+      // 
+      this.errorProvider.ContainerControl = this;
+      // 
       // AddAzureServiceDialog
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange;
       this.ClientSize = new System.Drawing.Size(496, 436);
       this.Controls.Add(this.lblCertificateFile);
@@ -358,4 +368,5 @@
       this.panelDeploymentOptions.ResumeLayout(false);
       this.panelDeploymentOptions.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
       this.ResumeLayout(false);
       this.PerformLayout();
@@ -394,4 +405,5 @@
     private System.Windows.Forms.Button btnCancel;
     private System.Windows.Forms.Label lblCertificateFile;
+    private System.Windows.Forms.ErrorProvider errorProvider;
   }
 }
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 7423)
+++ /branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/AddAzureServiceDialog.cs	(revision 7424)
@@ -2,4 +2,5 @@
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Text.RegularExpressions;
 using System.Windows.Forms;
 using HeuristicLab.Clients.Hive.CloudManager.Azure;
@@ -108,11 +109,4 @@
           }
       }
-    }
-
-    private bool ValidateInput() {
-      bool valid = true;
-      // TODO: input validation
-      // see http://stackoverflow.com/questions/769184/winform-ui-validation
-      return valid;
     }
 
@@ -166,5 +160,8 @@
       if (cmbChooseSubscription.SelectedItem != null) {
         Subscription sub = (Subscription)cmbChooseSubscription.SelectedItem;
-        if (ValidateInput()) {
+        // the controls collection can be the whole form or just a panel or group
+        if (Validation.hasValidationErrors(this.Controls)) {
+          return;
+        } else {
           bool newHostedServiceChecked = cbNewHostedService.Checked;
           bool regionChecked = rbRegion.Checked;
@@ -301,4 +298,42 @@
       }
     }
+
+    private void tbServiceName_Validating(object sender, CancelEventArgs e) {
+      if (cbNewHostedService.Checked) {
+        string url = tbServiceName.Text.Trim();
+        if (url == String.Empty) {
+          errorProvider.SetError(tbServiceName, "A URL is required for the hosted service.");
+          e.Cancel = true;
+        } else if (!isValidHostedServiceUrl(url)) {
+          errorProvider.SetError(tbLabel, "A hosted service name must be between 1 and 63 " +
+                                          "characters long, and be composed of letters, numbers " +
+                                          "and hyphens. Hyphens shouldn't be first or last letter.");
+          e.Cancel = true;
+        } else {
+          errorProvider.SetError(tbServiceName, "");
+        }
+      }
+    }
+
+    private void tbLabel_Validating(object sender, CancelEventArgs e) {
+      if (cbNewHostedService.Checked) {
+        if (tbLabel.Text.Trim() == String.Empty) {
+          errorProvider.SetError(tbLabel, "A name is required for the hosted service.");
+          e.Cancel = true;
+        } else {
+          errorProvider.SetError(tbLabel, "");
+        }
+      }
+    }
+
+    private bool isValidHostedServiceUrl(string url) {
+      string regexString = @"[a-zA-Z0-9]+[a-zA-Z0-9-]{0,61}[a-zA-Z0-9]+";  //TODO
+      Regex regex = new Regex(regexString);
+      if (regex.IsMatch(url)) {
+        return true;
+      } else {
+        return false;
+      }
+    }
   }
 }
