IPDirector not reflecting changes in directory

After a major IPDirector and Multicam upgrade my customer’s Database Explorer no longer reflected the actual set of files that existed on the network storage: instead of 18 files that could be seen in Windows Explorer, IPDirector has shown 45 assets, some of which have referred to files that have been deleted a while ago.

Simply triggering a ‘Search for New File in Directory and Sub-Directory’ would not yield any noticeable changes in Database Explorer.

We needed to go deeper to see what was happening!

I have brought up advanced service monitoring to see what SyncroDB service has been actually doing:

It looks like when ‘Search for New File in Directory and Sub-Directory’ is triggered, the service successfully recognizes that some files are no longer in the folder and attempts to make them offline in the database. Why are we not seeing any changes in our DB explorer then? Some operation must have been failing in the background. I have turned to service logs to see what the error might have been:

The error message above clearly suggests that the application is missing the required version of Newtonsoft.JSON library. The configuration file, which in this case is SyncroDBService.exe.config, contains references to assemblies that have been bound to the the service:

It contains the following line:

<dependentAssembly>

<assemblyIdentity name=”Newtonsoft.Json” publicKeyToken=”30ad4fe6b2a6aeed” culture=”neutral” />

<bindingRedirect oldVersion=”0.0.0.0-7.0.0.0″ newVersion=”7.0.0.0″ />

</dependentAssembly>

Simply put, the lines above allow the developer to specify which application library (*.dll) is loaded. The version specified in the config file is 7.0.0.0. I wanted to verify whether this matched the version of the Newtonsoft.Json library found next to SyncroDBService.config.xml executable:

Above, you could see how my older version of PowerShell (based on an older .NET Framework) did not allow me to find the version of the provided assembly. So I have tried a newer one on Windows 10:

Here we can see that the library shipped with the software has version 9. No wonder SyncroDB service couldn’t load it. Now, the question is: has the application been shipped with the wrong config file or the wrong assembly version? I very much doubt it. If we look into the package contents the *.config file references the correct version:

Then I have looked at the Creation Date of the config file and things became a bit clearer:

It could be that the old configuration file has been copied into the folder, overwriting the new one. That has changed the assembly binding, stopping SyncroDB from being able to update the database successfully.

Once I have changed the value in the config file to 9.0.0.0 and restarted the service, IPDirector’s Database Explorer view has actually updated successfully. The next step was to re-create the config file from scratch, ensuring it fully meets format used by the new version of SyncroDB service. Another IPDirector mystery has been solved 😉