Index: trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs	(revision 884)
+++ trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs	(revision 886)
@@ -89,5 +89,5 @@
       //clientCommunicator.LoginAsync(ConfigurationManager.GetInstance().GetClientInfo());
 
-      Heartbeat beat = new Heartbeat { Interval = 5000 };
+      Heartbeat beat = new Heartbeat { Interval = 30000 };
       beat.StartHeartbeat();     
 
@@ -154,5 +154,6 @@
       bool sandboxed = false;
 
-      AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.JobId.ToString(), sandboxed);
+      PluginManager.Manager.Initialize();
+      AppDomain appDomain =  PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.JobId.ToString(), sandboxed, typeof(TestJob));
       
       appDomains.Add(e.Result.JobId, appDomain);
Index: trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs
===================================================================
--- trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs	(revision 884)
+++ trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs	(revision 886)
@@ -160,5 +160,5 @@
     }
 
-    public AppDomain CreateAndInitAppDomainWithSandbox(string friendlyName, bool sandboxed) {
+    public AppDomain CreateAndInitAppDomainWithSandbox(string friendlyName, bool sandboxed, Type jobType) {
 
       PermissionSet pset;
@@ -176,8 +176,12 @@
       Runner remoteRunner = (Runner)applicationDomain.CreateInstanceAndUnwrap(typeof(Runner).Assembly.GetName().Name, typeof(Runner).FullName);
       NotifyListeners(PluginManagerAction.Initializing, "All plugins");
-      if (remoteLoader != null) {
-        remoteRunner.LoadPlugins(remoteLoader.ActivePlugins);
-      } else if (LoadedPlugins != null && LoadedPlugins.Count > 0) {
-        remoteRunner.LoadPlugins(LoadedPlugins);
+
+      DiscoveryService dService = new DiscoveryService();
+      PluginInfo jobPlugin = dService.GetDeclaringPlugin(jobType);
+
+      List<PluginInfo> depPlugins = GetDependentPlugins(jobPlugin);
+
+      if (depPlugins != null && depPlugins.Count > 0) {
+        remoteRunner.LoadPlugins(depPlugins);
       }
       NotifyListeners(PluginManagerAction.Initialized, "All plugins");
Index: trunk/sources/HeuristicLab.PluginInfrastructure/Properties/AssemblyInfo.frame
===================================================================
--- trunk/sources/HeuristicLab.PluginInfrastructure/Properties/AssemblyInfo.frame	(revision 884)
+++ trunk/sources/HeuristicLab.PluginInfrastructure/Properties/AssemblyInfo.frame	(revision 886)
@@ -24,4 +24,5 @@
 using System.Runtime.InteropServices;
 using HeuristicLab.PluginInfrastructure;
+using System.Security;
 
 // General Information about an assembly is controlled through the following 
@@ -36,4 +37,5 @@
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
+[assembly: AllowPartiallyTrustedCallers]
 
 // Setting ComVisible to false makes the types in this assembly not visible 
Index: trunk/sources/HeuristicLab.PluginInfrastructure/Runner.cs
===================================================================
--- trunk/sources/HeuristicLab.PluginInfrastructure/Runner.cs	(revision 884)
+++ trunk/sources/HeuristicLab.PluginInfrastructure/Runner.cs	(revision 886)
@@ -24,4 +24,6 @@
 using System.Text;
 using System.Reflection;
+using System.Security.Permissions;
+using System.Security;
 
 namespace HeuristicLab.PluginInfrastructure {
@@ -29,4 +31,6 @@
 
     public void LoadPlugins(ICollection<PluginInfo> plugins) {
+      //FileIOPermission fileperm = new FileIOPermission(FileIOPermissionAccess.AllAccess, @"C:\Program Files\HeuristicLab 3.0\plugins\");
+      //fileperm.Assert();
       foreach(PluginInfo pluginInfo in plugins) {
         foreach(string assemblyName in pluginInfo.Assemblies) {
@@ -34,4 +38,5 @@
         }
       }
+      //CodeAccessPermission.RevertAssert();
       PluginManager.Manager.LoadedPlugins = plugins;
     }
