Index: trunk/sources/HeuristicLab.Hive.Client.Communication/ClientConsoleServer.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Communication/ClientConsoleServer.cs	(revision 901)
+++ trunk/sources/HeuristicLab.Hive.Client.Communication/ClientConsoleServer.cs	(revision 901)
@@ -0,0 +1,55 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.ServiceModel.Description;
+using System.ServiceModel;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Hive.Client.Communication.Interfaces;
+
+namespace HeuristicLab.Hive.Client.Communication {
+  public class ClientConsoleServer {
+
+    DiscoveryService discService = new DiscoveryService();
+   
+    private bool AddMexEndpoint(ServiceHost serviceHost) {
+      if (serviceHost != null) {
+        ServiceMetadataBehavior behavior =
+            new ServiceMetadataBehavior();
+        serviceHost.Description.Behaviors.Add(behavior);
+
+        return serviceHost.AddServiceEndpoint(
+          typeof(IMetadataExchange),
+          MetadataExchangeBindings.CreateMexTcpBinding(),
+          "mex") != null;
+      } else
+        return false;
+    }
+    
+    public ServiceHost StartClientConsoleServer(Uri uriTcp) {
+      IClientConsoleCommunicator[] clientConsoleServerInstances =
+        discService.GetInstances<IClientConsoleCommunicator>();
+
+      if (clientConsoleServerInstances.Length > 0) {
+        ServiceHost serviceHost =
+                new ServiceHost(clientConsoleServerInstances[0].GetType(),
+                  uriTcp);
+
+        System.ServiceModel.Channels.Binding binding =
+          new NetTcpBinding();
+
+        serviceHost.AddServiceEndpoint(
+          typeof(IClientConsoleCommunicator),
+              binding,
+              "ClientConsoleCommunicator");
+
+        AddMexEndpoint(serviceHost);
+
+        serviceHost.Open();
+        return serviceHost;
+      } else {
+        return null;
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Client.Communication/HeuristicLab.Hive.Client.Communication.csproj
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Communication/HeuristicLab.Hive.Client.Communication.csproj	(revision 900)
+++ trunk/sources/HeuristicLab.Hive.Client.Communication/HeuristicLab.Hive.Client.Communication.csproj	(revision 901)
@@ -68,4 +68,5 @@
   <ItemGroup>
     <Compile Include="ClientConsoleCommunicator.cs" />
+    <Compile Include="ClientConsoleServer.cs" />
     <Compile Include="ClientConsole\ConnectionContainer.cs" />
     <Compile Include="ClientConsole\JobStatus.cs" />
Index: trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs	(revision 900)
+++ trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs	(revision 901)
@@ -53,40 +53,7 @@
 
     public void Start() {
-      Uri baseAddress = new Uri("http://localhost:8000/ClientConsole");
-      string address = "net.pipe://localhost/ClientConsole/ClientConsoleCommunicator";
 
-      DiscoveryService discService =
-        new DiscoveryService();
-      IClientConsoleCommunicator[] clientCommunicatorInstances =
-        discService.GetInstances<IClientConsoleCommunicator>();
-
-      if (clientCommunicatorInstances.Length > 0) {
-        ServiceHost serviceHost =
-                new ServiceHost(clientCommunicatorInstances[0].GetType(),
-                  baseAddress);
-
-        System.ServiceModel.Channels.Binding binding =
-          new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
-
-        serviceHost.AddServiceEndpoint(
-          typeof(IClientConsoleCommunicator),
-              binding,
-              address);
-
-        /*serviceHost.AddServiceEndpoint(
-            typeof(IMetadataExchange),
-            MetadataExchangeBindings.CreateMexNamedPipeBinding(),
-            "mex");
-
-        serviceHost.Open();*/
-
-        ServiceMetadataBehavior smb = new ServiceMetadataBehavior();
-        smb.HttpGetEnabled = true;
-        smb.HttpGetUrl = new Uri("http://localhost:8001/ClientConsole/");
-        serviceHost.Description.Behaviors.Add(smb);
-
-        serviceHost.Open();
-
-      }
+      ClientConsoleServer server = new ClientConsoleServer();
+      server.StartClientConsoleServer(new Uri("net.tcp://127.0.0.1:8000/ClientConsole/"));
 
       clientCommunicator = ServiceLocator.GetClientCommunicator();
