.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.

  • 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.

  • Hi Markus. Yes we did run the update via the Monitor page after the 9.1 migration.

  • Hi,

    This update process (including web.config patching) usually works fine, there have been no reports of problems so far. If you would like us to investigate I would suggest to keep the Update.log file from the web server, and contact support.

    Thanks,

    Hanno

  • Resolution
    Open the Server Manager Tool. Configure IE ESC is located on the right hand side of the interface in the section heading Security Information.
    Select the link Configure IE Esc and the configuration window will open.
    Turn off IE ESC for Administrators and Users.
    Restart Internet Explorer.

    This may help you,

    Rachel Gomez

  • Thank you for that Rachel.

    We have manage to to resolve it by just re-installing the Web applications from the installer. At first we just relied on the auto-update from the database, but a re-install is the way to go.

    Kind regards

    Werner

  • 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