TFS4JIRA Self-Hosted - How to deal with "System.Web.Helpers" server error (2 Self-hosted instances on one machine)

Possible use case

The user is trying to update the TFS4JIRA Self-hosted app to the newest version. After the installation is completed, when the user tries to access the synchronizer, one of the following errors occurs:

image-20240613-093619.png
image-20240613-093655.png

Root cause

The Source File path is essential in these errors. By default, the synchronizer installation path is C:\inetpub\wwwroot\tfs-jira-synchronizer. As it can be seen in the screenshots, the source file path starts with drive E:\. This can differ depending on the machine's setup where the synchronizer is installed. Still, if the drive letter is different than C:\, it does mean that the user has previously installed the synchronizer on a different drive than the default one (this can be done via the command line, as explained in this article: https://appfire.atlassian.net/wiki/spaces/TFS4JIRA/pages/148177967 ). However, the user kept the default installation path during the update. This resulted in 2 separate instances of the synchronizer on one machine, which is not supported. Please note that even if the user uninstalled TFS4Jira before the update, the uninstaller does not remove all synchronizer files. That can still cause issues if the new version is installed in a different directory/drive.

Solution

To resolve this issue and access the synchronizer, the user should:

  1. Backup 2 files: Web.config from X:\inetpub\wwwroot\tfs-jira-synchronizer folder and config.sdf from X:\inetpub\wwwroot\tfs-jira-synchronizer\App_Data (config.sdf can be skipped if the user is using a different DB than the default SQL Server Compact). Please note that the “X” in the directory path should match the drive where the user had TFS4JIRA Self-hosted installed before the update attempt (in the case shown above, this would be the E:\ drive).

  2. Remove any present TFS4JIRA synchronizer using Windows's default uninstallation process. Once completed, manually remove all left-over files (simply delete all “tfs-jira-synchronizer” folders from the inetpub\wwwroot folders on the machine).

  3. Go to IIS Manager (CMD: inetmgr) and remove any instances of TFS4JIRA in the application pools.

  4. Perform a clean install of the latest TFS4JIRA Self-hosted app

  5. Restore the Web.config and config.sdf files. Please remember that in the case of the Web.config file, the user should not overwrite the new file with the backup one. Instead, the user should copy the backup file's content and replace the new file's content.