args.PageContext выдал исключение типа System.InvalidOperationException - PullRequest
0 голосов
/ 23 мая 2019

Я получаю ошибку в моем собственном процессоре конвейера sitecore

'args.PageContext' сгенерировал исключение типа 'System.InvalidOperationException'

мой процессор работает до Sitecore.Mvc.Pipelines.Request.RequestBegin.SetupPageContext процессора.

[InvalidOperationException: Attempt to retrieve context object of type 'Sitecore.Mvc.Presentation.PageContext' from empty stack.]
   Sitecore.Mvc.Common.ContextService.Peek() +259
   Sitecore.Mvc.Pipelines.MvcPipelineArgs.get_PageContext() +23
   Sitecore.Mvc.Pipelines.Request.CreateController.CreateItemController.CreateController(CreateControllerArgs args) +25
   Sitecore.Mvc.Pipelines.Request.CreateController.CreateItemController.Process(CreateControllerArgs args) +63
   (Object , Object ) +14
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +195
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +161
   Sitecore.Mvc.Controllers.SitecoreControllerFactory.CreateSitecoreController(RequestContext requestContext, String controllerName) +221
   Sitecore.Mvc.Controllers.SitecoreControllerFactory.CreateController(RequestContext requestContext, String controllerName) +95

[ControllerCreationException: Could not create controller: 'Sitecore'. ]
   Sitecore.Mvc.Controllers.SitecoreControllerFactory.CreateController(RequestContext requestContext, String controllerName) +171
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +263
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +77
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1122
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +131
...