Search code examples
sitecoresitecore8sitecore8.2

"Post condition failed" error when upgrading from 8.1 to 8.2


I'm in process of upgrading sitecore from 8.1 to 8.2 and now splitting into CD and CMS but im having issue getting CD working its giving me following error.

Not able to figure out where its causing the issue,

Stack trace:

[InvalidOperationException: Post condition failed]
Sitecore.Diagnostics.Assert.ResultNotNull(T result, String message) +85 Sitecore.Configuration.DefaultFactory.GetDatabase(String name) +86 Sitecore.Configuration.DefaultFactory.GetDatabases() +121 Sitecore.Data.Managers.DefaultItemManager.Initialize() +105 (Object , Object[] ) +117 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484 (Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +259
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +704
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +618
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Post condition failed]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712


Solution

  • Managed to solve the issue by enabling switchMasterToWeb.config in Z.switchMasterToWeb folder instead of switchMasterToWeb in include folder.