Upgrage kentico 11 to 12

Ryan Nguyen asked on August 22, 2019 11:47

I can't run site after upgrade

Error: An item with the same key has already been added.

Package config: https://pastebin.com/9tfG1Yh1

web.config: https://pastebin.com/EuSBmaHi

Screenshot: http://prntscr.com/ow04rk

Any idea to debug this?

Correct Answer

Matúš Ušiak answered on August 22, 2019 12:23

Hi Chu,
Try cleaning the solution and check for any duplicate Global.asax files.
Also, are you using any custom modules? If so, each module has a name which is passed in the base class constructor:

public MyModule(): base("MyModule") { }

Is it possible that the name used in your custom module(s) has been used more than once or matches one of a default module?

0 votesVote for this answer Unmark Correct answer

Recent Answers

Juraj Ondrus answered on August 22, 2019 12:49

I would recommend enabling debug mode in web.config file as described in the error page to see more details. Also, if you are using any custom event handlers, custom macro methods or anything which is registered as a class in App_Code or custom assembly project, make sure they are registered using unique names in the constructors. I mean this in the class code:

// Module class constructor, the system registers the module under the name "CustomInit"
public CustomInitializationModule()
    : base("CustomInit")

Maybe you have more modules with the same constructor name.

0 votesVote for this answer Mark as a Correct answer

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