TFS4JIRA Self-Hosted - "System.Web.Helpers" server error - Two Self-hosted instances on one machine
Use case
You are trying to update the TFS4JIRA self-hosted app to the newest version. After the installation completes, you try to access the synchronizer, and one of the following errors occurs:
Root cause
The source file path is essential in these errors and, by default, the synchronizer installation path is C:\inetpub\wwwroot\tfs-jira-synchronizer.
As seen in the screenshots above, the source file path starts with E:\. The source file path can differ depending on the machine's setup where the synchronizer is installed. However, if the drive letter is different than C:\, it means you previously installed the synchronizer on a drive other than the default, which can be accomplished through the command line, as explained in this article:
Installing TFS4JIRA SynchronizerArchived
Then, the default installation path was specified during the update, resulting in two separate instances of the synchronizer on one machine, which is not supported.
Even if you uninstalled TFS4Jira before the update, the uninstaller doesn’t remove all synchronizer files, causing the new version to install to a different directory.
Solution
Use the following steps to resolve this issue and access the synchronizer:
Backup two files:
Web.config from X:\inetpub\wwwroot\tfs-jira-synchronizer folder
Replace X:\ in the directory path with the drive where TFS4JIRA was installed before the update attempt.
config.sdf from X:\inetpub\wwwroot\tfs-jira-synchronizer\App_Data
config.sdf can be skipped if you are using a database other than the default SQL Server Compact.
Replace X:\ in the directory path with the drive where TFS4JIRA was installed before the update attempt.
Use the Windows Uninstall process to remove any TFS4JIRA Synchronizer instances.
Once completed, manually remove any remaining TFS4JIRA Synchronizer files by deleting all
“tfs-jira-synchronizer” folders from the inetpub\wwwroot folders on the machine.
Go to IIS Manager (CMD: inetmgr) and remove any instances of TFS4JIRA in the application pools.
Perform a clean install of the latest TFS4JIRA self-hosted app.
Restore the Web.config and config.sdf files.
Please remember that in the case of the Web.config file, you should not overwrite the new file with the backup one. Instead, copy the backup file's content and replace the new file's content.