The user was not found in the JWT token, nor in the current virtual context URL.

Geo Neeliyara asked on September 19, 2022 12:57

Hi,

I am getting following error while accessing the page builder on uat enviornment. Local instance its works fine. Kentico Core v13.0.82

An unhandled exception occurred while processing the request. InvalidVirtualContextException: Try reloading the administration interface. The user was not found in the JWT token, nor in the current virtual context URL.

Regards, Geo

Recent Answers


vasu yerramsetti answered on September 20, 2022 12:22

Please check the following -

  1. Is configured correctly Presentation URL (https)
  2. CMSHashStringSalt key same for both CMS and Core application
  3. Clear the browser cache and check it
0 votesVote for this answer Mark as a Correct answer

Geo Neeliyara answered on September 29, 2022 11:53

Hi, I tried different things. finally got resolved.

  1. Check the presentation url
  2. CMSHashStringSalt key same for both CMS and Core application
  3. Reset the macro signature ( under system --> macros --> signatures)
  4. Clear Cahce & Restart Application
  5. Applied latest hotfix
0 votesVote for this answer Mark as a Correct answer

Dilip Kumar answered on May 8, 2023 13:17

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

0 votesVote for this answer Mark as a Correct answer

Geo Neeliyara answered on May 8, 2023 13:41

Hi Dilip,

Can you try the following

  1. If you are using different port, please update the site settings accordingly

eg: Administration Domain : localhost:5004 Presentation URL : http://localhost:25291

  1. If you are using https url for presentation then please set the admin url to https as well.

Regards, Geo

0 votesVote for this answer Mark as a Correct answer

Dilip Kumar answered on May 8, 2023 13:56 (last edited on May 8, 2023 13:56)

Hi Geo ,I have already set presentation url https://localhost:44333/ and administration Domain : localhost:44322 under site . Page preview does work but page builder is giving jwt error

0 votesVote for this answer Mark as a Correct answer

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