Kentico 8.2 to 9.1 upgrade after throwing exceptions

Gopi Krishna asked on July 4, 2018 13:17

I am upgrading Kentico website from 8.0 to 10.0. From 8.0 -> 8.1,8.1 -> 8.2 it went smoothly. After upgrading from 8.2 to 9.1 site throwing error

Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Screenshot

I have excluded the CMSApp_MVC.csproj,CMSApp_MVC.csproj.user files also as mentioned in Documentation.

I tried with NuGet package update command but no use.

How to resolve this issue?

Thanks in advance

Correct Answer

vasu yerramsetti answered on July 4, 2018 14:25

@Gopi

Perform below steps and after check the below URL for system requirement.

  1. Clearing out "temporary asp.net files" from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
  2. Restart the Application pool from IIS

https://docs.kentico.com/k9/installation/server-and-hosting-requirements

1 votesVote for this answer Unmark Correct answer

Recent Answers


Dave Wanta answered on July 4, 2018 14:19

This smells like an incorrect reference in a web.config file.

Can you check your web.configs (you might have multiple in sub directories).

Everything should be referencing v4. Also, verify you have the assembly binding redirect. Like:

    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
        </dependentAssembly>
        <probing privatePath="CMSDependencies\Newtonsoft.Json.6.0.0.0"/>
    </assemblyBinding>
</runtime>
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.