Video Screencast Help

Custom TaskServer handler replication to Task Server side.

Created: 28 Nov 2011 • Updated: 08 Dec 2011 | 4 comments
This issue has been solved. See solution.

Hi all,

I am working on implementing the custom TaskServerHandler library for SMP 7.1 platform. I've created the separate assembly and put the classes which implemented the necessary logic for my aims. My installation program set up the components on SMP environment and registered them properly. It works perfect on environment there are SMP and Task Service together. But it does not work on separate environments. On task server side I got an exception: 

 

<entry process="AtrsHost" source="unk" time="11/23/2011 11:18:42 AM" type="Warning" >
  <![CDATA[The operation Start for instance d59a397a-534d-48da-8a50-7bf4f48f1b89 failed with the exception: System.IO.FileNotFoundException: Could not load file or assembly 'XXXXXXXXX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=6d9a5987cd33ce68' or one of its dependencies. The system cannot find the file specified.
File name: 'XXXXXXXXX, Version=2.0.0.0, Culture=neutral, PublicKeyToken=6d9a5987cd33ce68'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at Altiris.DotNetLib.Reflection.ObjectCreator.Create(String objType, String objAssembly)
   at Altiris.DotNetLib.Reflection.ObjectCreator.Create(String typeAndAssembly)
   at Altiris.ClientTask.Server.Execution.ClientTaskExecutionEngine.GetTaskHandler(IBaseTaskExecutionInstance instance)
   at Altiris.TaskManagement.Common.Execution.Engine.TaskExecutionEngine.ProcessTaskExecuteOperation(TaskInstanceRequest request)
 
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
]]>
</entry>
 
 Does anybody know what I have to implement to solve this issue? Should I apply some configuration settings in configuration files or apply another approach?

Comments 4 CommentsJump to latest comment

Abhinav Sharma's picture

Hi,

Please try to install NS core task service on that environment. This can be done through SMP UI (Settings-->Notification Server  --> Site Server Settings).

Thanks,
Abhinav Sharma

Alexey-Art's picture

Hi,

The problem is I dont know how to install my TaskServerHandler library on TaskServer side. That is why I get an exception on Task Server. What I should implement to get ability to set up automatically the TaskServer Handlers? Note the NS core service already installed on TS .

 

Thanks,

Alexey

Abhinav Sharma's picture

Hi,

First you have to stop Task server service on TS and then check to make sure that task server assembly is published into GAC (Global Assembly Cache) if not then try it to publish in GAC manualy.

Please let us know if this helps you.

Thanks,
Abhinav Sharma

SOLUTION
Alexey-Art's picture

Hi,

Thank you for responce. I put my assembly manually into GAC and it works well. But how to do all these steps automatically from Console for example. What i should implement in this case? Right now i have the installation package which contains two libraries. Frist is assembly for my custom tasks and the second one is my custom TaskServer handler classes.

1. Do I need separate this installer on two independend packages and set up each of them on appropriate environment?

2. Can I set up my tasks on SMP side and put the second installer into some specific folder and after that the SMP will handle this msi and set up on Task Servers automatically?

Thanks,

Alexey.