Unknown error after upgrade Kentico

Mr Who asked on August 30, 2021 14:25

After upgrading Kentico, I'm getting the following error. IDX10703: Cannot create a 'System.RuntimeType', key length is zero. This is strange, because the project works fine on my local machine. Please tell me has anyone encountered a similar error?

Recent Answers


Brian McKeiver answered on August 30, 2021 23:38 (last edited on August 30, 2021 23:39)

During the upgrade, did you update to .NET framework 4.8 from an earlier version of the .NET framework? If so you might need to make sure all dependent libraries are updated because that feels like a .NET thing based off of some quick googling of that error message. what version of System.IdentityModel.Tokens.Jwt are you using? Looks like a clean KX13 build is using 6.7.1.10630.

If it worked locally, did you clean out the whole bin directory on the target server before deploying the new KX 13 build ?

0 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 31, 2021 05:54 (last edited on August 31, 2021 07:40)

Hello Brian McKeiver,

  1. Yes, I've updated .NET framework to 4.8 version.
  2. I'm using System.IdentityModel.Tokens.Jwt version 6.7.1.10630.
  3. Yes, I usually delete bin and obj directories before publishing the application.
0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on August 31, 2021 06:38

It might also be worth checking:

  • clear your browser cookies
  • clear Temporary ASP.NET Files
  • check if your Bin folder contains old version CMS libraries, if so - delete those
0 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 31, 2021 07:34 (last edited on August 31, 2021 07:41)

Hello Dmitry Bastron,

  1. I cleaned coockie up, but it didn't help me.
  2. Do I need remove all of the files located in the directory? I can't delete root folder :)
  3. I've checked all CMS dlls correspond to the Kentico version.
0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on August 31, 2021 07:43

Yes, it's better to remove all files and folders under Temporary ASP.NET Files. Typically, you'd need to stop IIS first because it's blocking these files. To do this you can use iisreset /stop command, and to start it back after clearing - iisreset /start

0 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 31, 2021 08:30

I've removed all of the files in the directory. Thank you for help Dmitry but I still get the same error

0 votesVote for this answer Mark as a Correct answer

Mr Who answered on August 31, 2021 13:37

Guys, I probably forgot to mention what is used in the project .Net framework 4.8 instead .Net Core.

0 votesVote for this answer Mark as a Correct answer

Brian McKeiver answered on August 31, 2021 19:31

I'd reach out to support at this point then, especially if it works on your local.

1 votesVote for this answer Mark as a Correct answer

Namita Patil answered on September 27, 2021 20:43

Hello Mr. Who,

Did you find any resolution for above issue? As we are also facing same issue while upgrading from Kentico 12 to 13. For me it is working fine on Local, but not on our QA servers. I am getting error on QA "IDX10703: Cannot create a 'System.RuntimeType', key length is zero.", but on local it works fine.

I already checked below things: 1. I cleaned cookies already and Temp .net files too. 2. I've checked all CMS dlls correspond to the Kentico version. 3. I've updated .NET framework to 4.8 version. 4. I'm using System.IdentityModel.Tokens.Jwt version 6.7.1.10630. 5. I usually delete bin and obj directories before publishing the application.

Can you please let me know, if this issue got resolved for you lateron?

Regards,

Namita

0 votesVote for this answer Mark as a Correct answer

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