Question/Problem Description
- Unable to start Web after upgrading to 11.4.0 or higher
- Newtonsoft.Json error while starting web after Upgrade to 11.4.0 or higher
Error Message :
Could not load file or assembly ' Newtonsoft.Json , Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Environment
Product: Update Web Version: 11.4.0 or higher
OS/Platform: Any
Resolution
Clarification:
After the upgrade, we can not replace/upgrade the web.config file from the new setup, because it' possible that version already installed may have custom settings in web.config file. After repair/upgrade, original web.config will be unchanged, but a file web.config.update_to_check in web folder will be created, from which user can see the changes and update the original web.config files with the necessary changes.
Modify version of the below mentioned Assembly in web.config file located under ..\update.web\web folder:
From: <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" /> </dependentAssembly> To: <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /> </dependentAssembly>