Kentico Upgrade from k10 to k11

Anand Bisht asked on November 12, 2019 23:04


We are upgrading Kentico 10 to 11 and having issue. Most of the issues I have tried to surpress for timebing but this one I could not resovled. Has any one expreince this issue if so any input on resolution?

Server Error in '/' Application. Unable to cast object of type 'CMSModuleLoader' to type 'CMS.Core.ModuleEntry'. 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.InvalidCastException: Unable to cast object of type 'CMSModuleLoader' to type 'CMS.Core.ModuleEntry'.

Source Error:

Line 47: Line 48: // Ensures that registered modules are registered from AppCode/CMSApp assembly Line 49: ModuleEntryManager.EnsureAppCodeModules(appCodeAssembly); Line 50: } Line 51:

Source File: D:\Projects\Kentico\Kentico\web\CMS\Global.asax.cs Line: 49

Stack Trace:

[InvalidCastException: Unable to cast object of type 'CMSModuleLoader' to type 'CMS.Core.ModuleEntry'.] CMS.Core.<>c__DisplayClass1_0.

Recent Answers

Brenden Kehren answered on November 12, 2019 23:32

Looks like maybe some old code which didn't get upgraded with the process. Compare a fresh install of V11 Global.ascx.cs with your version and see what's different.

You may also have some custom global events with old code in them as well. CMSModuleLoaderis no longer a valid class in v11 so your code will need to be converted properly.

1 votesVote for this answer Mark as a Correct answer

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