The user was not found in the JWT token, nor in the current virtual context URL on localhost after

Dilip Kumar asked on May 8, 2023 13:20

Hi, I have migrated my kentico 12 MVC application to Kentico 13 MVC 5 app using https://docs.xperience.io/installation/upgrading-to-xperience-13. Migration is done successfully . But when I page builder - option in Kentico Admin , getting “Try reloading the administration interface. The user was not found in the JWT token, nor in the current virtual context URL.” Error in Kentico Admin on my VS2022 localhost.

I am running app using VS 2022 on localhost and already tried below solution but still keep getting this error.

• I have removed all response security restrictions . • Admin is running on different port and MVC on different port, so I added below key in MVC project.

• I also enabled ssl (https on localhost ) using Vs2002

But I am still getting the same below error

InvalidVirtualContextException: Try reloading the administration interface. The user was not found in the JWT token, nor in the current virtual context URL.] Kentico.Content.Web.Mvc.VirtualContextPrincipalRetriever.GetPrincipal(String jwtToken) +417 Kentico.Content.Web.Mvc.VirtualContextPrincipalAssigner.SetVirtualContextPrincipal(IVirtualContextPrincipalRetriever virtualContextPrincipalRetriever) +229 CMS.Base.AbstractHandler.CallEventHandler(EventHandler1 h, TArgs e) +115 CMS.Base.AbstractHandler.Raise(String partName, List1 list, TArgs e, Boolean important) +1012 CMS.Base.SimpleHandler2.RaiseExecute(TArgs e) +145 CMS.Base.SimpleHandler2.StartEvent(TArgs e) +236 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +223 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +94

Recent Answers


eSiteful Corporation answered on May 11, 2023 00:04

I'm also experiencing this on an MVC 12 to 13 upgrade. Have you figured it out yet?

0 votesVote for this answer Mark as a Correct answer

Dilip Kumar answered on May 11, 2023 04:13

@esiteful-corporation I haven’t found any solution of this problem. Please let me know if you found any solution

0 votesVote for this answer Mark as a Correct answer

Chamara Janaka answered on December 30, 2023 10:51

Have you guys found a solution for this issue? I’m having the same issue.

0 votesVote for this answer Mark as a Correct answer

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