.Net Error after upgrading IT Shop to 9.1

After successfully upgrading our production environment from 8.1.5 to 9.1 we updated the IT Shop, but after that completed we received the following .Net error.

Server Error in '/IdentityManager' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Source File: D:\wwwroot\...\IdentityManager\web.config Line: 69

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

Resolution:

We resolved it by checking the product version of the System.Web.MVC.dll in wwwroot/IdentotyManager/bin.


Then in the Web.Config I changed
<compilation debug="false" defaultLanguage="c#" targetFramework="4.8">
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

to
<add assembly="System.Web.Mvc, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

and 

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.1" newVersion="5.2.7.0" />
</dependentAssembly>

to


<bindingRedirect oldVersion="0.0.0.0-3.0.0.1" newVersion="5.2.9.0" />

Reloaded the URL and all is okay. I guess the latest version of System.Web.MVC is newer in the latest .Net Framework 4.8 than what you have set in the upgrade process.

Parents Reply Children
  • Hi Hanno

    We just had the same issue when updating from 8.1.5 to 9.0. Within QBMFileRevision the version of the DLL System.Web.Mvc.dll was 5.2.61129.10 and error message displayed also was trying to load the version 5.2.7.0. The files in the binaries also were on the 5.2.61129.10 Version. We initiated the update via the monitor page. Reinstalling the Webproject resolved the issue for us.

    Kind reagrds,

    Mahdi