Index: /trunk/sources/HeuristicLab.Clients.OKB/3.3/HeuristicLab.Clients.OKB-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Clients.OKB/3.3/HeuristicLab.Clients.OKB-3.3.csproj	(revision 14731)
+++ /trunk/sources/HeuristicLab.Clients.OKB/3.3/HeuristicLab.Clients.OKB-3.3.csproj	(revision 14732)
@@ -114,4 +114,9 @@
     <Compile Include="Administration\ServiceClient\ProblemClass.cs" />
     <Compile Include="OKBRoles.cs" />
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+      <DependentUpon>Settings.settings</DependentUpon>
+    </Compile>
     <Compile Include="RunCreation\OKBSolution.cs" />
     <Compile Include="Plugin.cs" />
@@ -177,4 +182,8 @@
     <None Include="Properties\AssemblyInfo.cs.frame" />
     <None Include="Administration\ServiceClient\GenerateServiceClient.cmd" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
     <None Include="Query\ServiceClient\GenerateServiceClient.cmd" />
     <None Include="RunCreation\ServiceClient\GenerateServiceClient.cmd" />
Index: /trunk/sources/HeuristicLab.Clients.OKB/3.3/Properties/Settings.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.OKB/3.3/Properties/Settings.Designer.cs	(revision 14732)
+++ /trunk/sources/HeuristicLab.Clients.OKB/3.3/Properties/Settings.Designer.cs	(revision 14732)
@@ -0,0 +1,46 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeuristicLab.Clients.OKB.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default {
+            get {
+                return defaultInstance;
+            }
+        }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ArrayOfString xmlns:xsi=\"http://www.w3." +
+            "org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n  <s" +
+            "tring>WSHttpBinding_IQueryService</string>\r\n</ArrayOfString>")]
+        public global::System.Collections.Specialized.StringCollection EndpointConfigurationPriorities {
+            get {
+                return ((global::System.Collections.Specialized.StringCollection)(this["EndpointConfigurationPriorities"]));
+            }
+        }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("3")]
+        public int MaxEndpointRetries {
+            get {
+                return ((int)(this["MaxEndpointRetries"]));
+            }
+        }
+    }
+}
Index: /trunk/sources/HeuristicLab.Clients.OKB/3.3/Properties/Settings.settings
===================================================================
--- /trunk/sources/HeuristicLab.Clients.OKB/3.3/Properties/Settings.settings	(revision 14732)
+++ /trunk/sources/HeuristicLab.Clients.OKB/3.3/Properties/Settings.settings	(revision 14732)
@@ -0,0 +1,15 @@
+﻿<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="HeuristicLab.Clients.OKB.Properties" GeneratedClassName="Settings">
+  <Profiles />
+  <Settings>
+    <Setting Name="EndpointConfigurationPriorities" Type="System.Collections.Specialized.StringCollection" Scope="Application">
+      <Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
+&lt;ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
+  &lt;string&gt;WSHttpBinding_IQueryService&lt;/string&gt;
+&lt;/ArrayOfString&gt;</Value>
+    </Setting>
+    <Setting Name="MaxEndpointRetries" Type="System.Int32" Scope="Application">
+      <Value Profile="(Default)">3</Value>
+    </Setting>
+  </Settings>
+</SettingsFile>
Index: /trunk/sources/HeuristicLab.Clients.OKB/3.3/Query/QueryClient.cs
===================================================================
--- /trunk/sources/HeuristicLab.Clients.OKB/3.3/Query/QueryClient.cs	(revision 14731)
+++ /trunk/sources/HeuristicLab.Clients.OKB/3.3/Query/QueryClient.cs	(revision 14732)
@@ -24,4 +24,5 @@
 using System.IO;
 using System.Linq;
+using System.ServiceModel;
 using HeuristicLab.Clients.Common;
 using HeuristicLab.Common;
@@ -39,4 +40,7 @@
       }
     }
+
+    private int endpointRetries;
+    private string workingEndpoint;
 
     #region Properties
@@ -68,5 +72,5 @@
     }
     public void RefreshAsync(Action<Exception> exceptionCallback) {
-      var call = new Func<Exception>(delegate() {
+      var call = new Func<Exception>(delegate () {
         try {
           Refresh();
@@ -76,5 +80,5 @@
         return null;
       });
-      call.BeginInvoke(delegate(IAsyncResult result) {
+      call.BeginInvoke(delegate (IAsyncResult result) {
         Exception ex = call.EndInvoke(result);
         if (ex != null) exceptionCallback(ex);
@@ -156,6 +160,34 @@
 
     #region Helpers
+    private QueryServiceClient NewServiceClient() {
+      if (endpointRetries >= Properties.Settings.Default.MaxEndpointRetries)
+        return CreateClient(workingEndpoint);
+
+      var configurations = Properties.Settings.Default.EndpointConfigurationPriorities;
+      Exception exception = null;
+
+      foreach (var endpointConfigurationName in configurations) {
+        try {
+          var cl = CreateClient(endpointConfigurationName);
+          cl.Open();
+          workingEndpoint = endpointConfigurationName;
+          return cl;
+        } catch (EndpointNotFoundException e) {
+          exception = e;
+          ++endpointRetries;
+        }
+      }
+
+      throw exception ?? new EndpointNotFoundException("No endpoint for Query service found.");
+    }
+
+    private QueryServiceClient CreateClient(string endpointConfigurationName) {
+      var cl = ClientFactory.CreateClient<QueryServiceClient, IQueryService>(endpointConfigurationName);
+      return cl;
+    }
+
     private T CallQueryService<T>(Func<IQueryService, T> call) {
-      QueryServiceClient client = ClientFactory.CreateClient<QueryServiceClient, IQueryService>();
+      QueryServiceClient client = NewServiceClient();
+
       try {
         return call(client);
Index: /trunk/sources/HeuristicLab.Clients.OKB/3.3/app.config
===================================================================
--- /trunk/sources/HeuristicLab.Clients.OKB/3.3/app.config	(revision 14731)
+++ /trunk/sources/HeuristicLab.Clients.OKB/3.3/app.config	(revision 14732)
@@ -1,4 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
+  <configSections>
+    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+      <section name="HeuristicLab.Clients.OKB.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+    </sectionGroup>
+  </configSections>
   <system.serviceModel>
     <behaviors>
@@ -63,3 +68,18 @@
     </client>
   </system.serviceModel>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup><applicationSettings>
+    <HeuristicLab.Clients.OKB.Properties.Settings>
+      <setting name="EndpointConfigurationPriorities" serializeAs="Xml">
+        <value>
+          <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+            <string>WSHttpBinding_IQueryService</string>
+          </ArrayOfString>
+        </value>
+      </setting>
+      <setting name="MaxEndpointRetries" serializeAs="String">
+        <value>3</value>
+      </setting>
+    </HeuristicLab.Clients.OKB.Properties.Settings>
+  </applicationSettings>
+</configuration>
