Error after applying hotfix Kentico 7

geoff l asked on May 2, 2016 02:00

Hi,

I am having an error whereby after upgrading from v7.0.37 to v7.0.70 I am getting an error on loading my website. This is the error message that I get:

Could not load file or assembly 'CMS.CMSHelper, Version=7.0.4891.21017, Culture=neutral, PublicKeyToken=834b12a258f213f9' 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. 

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'CMS.CMSHelper, Version=7.0.4891.21017, Culture=neutral, PublicKeyToken=834b12a258f213f9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I have made sure that all the DLLs were copied over from the hotfix. Anyone have any ideas? Thanks!

Correct Answer

geoff l answered on July 11, 2016 04:31

I found that I had to redirect my assemblies directly in the web config file as per below

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="CMS.CMSHelper" publicKeyToken="834b12a258f213f9"/>
            <bindingRedirect oldVersion="7.0.4891.21017" newVersion="7.0.5123.9386"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="CMS.SiteProvider" publicKeyToken="834b12a258f213f9"/>
            <bindingRedirect oldVersion="7.0.4891.21012" newVersion="7.0.5123.9382"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="CMS.DataEngine" publicKeyToken="834b12a258f213f9"/>
            <bindingRedirect oldVersion="7.0.4891.21008" newVersion="7.0.5123.9377"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="CMS.SettingsProvider" publicKeyToken="834b12a258f213f9"/>
            <bindingRedirect oldVersion="7.0.4891.21003" newVersion="7.0.5123.9372"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="CMS.DocumentEngine" publicKeyToken="834b12a258f213f9"/>
            <bindingRedirect oldVersion="7.0.4891.21016" newVersion="7.0.5123.9385"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="CMS.GlobalHelper" publicKeyToken="834b12a258f213f9"/>
            <bindingRedirect oldVersion="7.0.4891.21007" newVersion="7.0.5123.9375"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="CMS.WorkflowEngine" publicKeyToken="834b12a258f213f9"/>
            <bindingRedirect oldVersion="7.0.4891.21014" newVersion="7.0.5123.9384"/>
        </dependentAssembly>
    </assemblyBinding>
</runtime>
0 votesVote for this answer Unmark Correct answer

Recent Answers


Michal Samuhel answered on May 2, 2016 10:08

Hi,

Have you checked the particular DLL CMS.CMSHelper if it had been updated as well?

You can try clearing the temporary .Net files:Also please try to delete .NET caches:

    "$appdata\Local\Microsoft\WebsiteCache\",
    "$appdata\Local\Microsoft\VisualStudio\9.0\ProjectAssemblies\",
    "$appdata\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\";

    "$windir\Microsoft.NET\Framework\v2.0.50727\Temporary ASP..NET Files\",
    "$windir\Microsoft..NET\Framework\v4..0.30319\Temporary ASP.NET Files\",
    "$windir\Microsoft.NET\Framework64\v2.0...50727\Temporary ASP..NET Files\",
    "$windir\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP...NET Files\",

Also you can always try to add references to dll files in your /Bin folder.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 2, 2016 14:22

Do you have any custom <location> nodes in your web.config? I know there were some issues with the KIM tool in v7 with that.

0 votesVote for this answer Mark as a Correct answer

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