.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
  • Did you run the AutoUpdate via the Monitor page after the migration to 9.1? There is code in place that updates the references in the web.config file.

    By the way, this has nothing to do with .Net Framework 4.8 but you are right, version 4.8 is a requirement for 9.1.

Reply
  • Did you run the AutoUpdate via the Monitor page after the migration to 9.1? There is code in place that updates the references in the web.config file.

    By the way, this has nothing to do with .Net Framework 4.8 but you are right, version 4.8 is a requirement for 9.1.

Children