Work Queue

'Could Not Load File or Assembly' in Logs

Issue

When the application fails to find and load an assembly (DLL), following exception is thrown:

System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

Reasons and Solutions

  1. The assembly itself is not found.In this case, the assembly is not present in your application path. Copy the assembly from release and paste it here and try again.
  2. The specific version of that assembly is not found.Sometimes, the assembly version referred by the application and the present assembly might vary due to incorrect deployment or during release process.
    1. Navigate to the application path.
    2. Open the application config file and template config file.
    3. Head to the "runtime" section under "configuration".
    4. You will find the assembly binding redirects. These are used to redirect references of "oldVersion" to "newVersion".Following is the sample assembly redirect:<runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
      <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
      <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
      </dependentAssembly>
      </assemblyBinding>
      </runtime>Here, this says, that all references of assemblies from version 0.0.0.0 to 12.0.0.0 (oldVersion) should use 12.0.0.0 (new Version)
    5. So, you should copy the version of Newtonsoft.Json.dll of version 12.0.0.0
    6. So, if you found an error for this DLL, probably you are using different version DLL.

How to find assembly version?

For TMAC Server, version 5.0.6.3001 onwards assembly versions are printed in logs on start up. Until this version, file versions were printed.

Assembly and file versions are different.

To find assembly version, run this command in your powershell window:

([system.reflection.assembly]::loadfile("C:\Tetherfi\TetherfiHome\TMACServer\Newtonsoft.Json.dll")).FullName

Substitute your application path and assembly name here.

Once you find your assembly version, you can verify what version assembly you have and do the needful.

 

Report To

If this issue was due to the incorrect release and not due to wrong deployment process, report this to the developer so that release can be corrected.

For TMAC components, report to tmac@tetherfi.com

For WorkQueue components, report to wq@tetherfi.com

TetherfiWorkAssignmentClient.WorkItemManager - Exception in AddWorkItemWithCustomerIdentifier:System.ServiceModel.EndpointNotFoundException

a) Issue Description

TComm logs show the following error

ERROR TetherfiWorkAssignmentClient.WorkItemManager - Exception in AddWorkItemWithCustomerIdentifier:System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://localhost:55006/WorkQueue1/ that could accept the message.

b) Cause

TComm is not able to connect to Workqueue to process a new incoming chat request

c) Troubleshooting

  1. Ensure Work queue service is up and running. If not, start the Work queue service. Once it’s started, open its endpoint in a browser to verify service description comes up.
  2. Ensure Work queue endpoint is correctly mentioned in comm server config as shown in the below screenshot.