Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user

The CD version of Sitecore 9 was installed on our CD server. The error below is typically seen with a SwitchMasterToWeb.config file issue in previous versions:

Post condition failed Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:

Exception Details: System.InvalidOperationException: Post condition failed

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. failed

Stack Trace:

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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() +110 (Object , Object[] ) +120 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 (Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +161
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +583
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

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

In this case, with Sitecore 9 we are getting this error withtwith the CD version. configurationConfiguration role for CM is set to "ContentManagement" with CD being "ContentDelivery". 

To my understanding, this is all you need to do to have your CD instance all setup since there is no longer a SwitchMasterToWeb.configSwitchMasterToWeb.config in Sitecore 9. 

Am I missing something? Any ideas or anyone seen this before on a CD instance with Sitecore 9?

The CD version of Sitecore 9 was installed on our CD server. The error below is typically seen with a SwitchMasterToWeb.config file issue in previous versions:

Post condition failed Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Post condition failed

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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() +110 (Object , Object[] ) +120 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 (Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +161
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +583
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

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

In this case, with Sitecore 9 we are getting this error witht the CD version. configuration role for CM is set to "ContentManagement" with CD being "ContentDelivery". To my understanding, this is all you need to do have your CD instance all setup since there is no longer a SwitchMasterToWeb.config in Sitecore 9. Am I missing something? Any ideas or anyone seen this before on a CD instance with Sitecore 9?

The CD version of Sitecore 9 was installed on our CD server. The error below is typically seen with a SwitchMasterToWeb.config file issue in previous versions:

Post condition failed Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:

System.InvalidOperationException: Post condition failed

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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() +110 (Object , Object[] ) +120 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 (Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +161
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +583
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

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

In this case, with Sitecore 9 we are getting this error with the CD version. Configuration role for CM is set to "ContentManagement" with CD being "ContentDelivery". 

To my understanding, this is all you need to do to have your CD instance all setup since there is no longer a SwitchMasterToWeb.config in Sitecore 9. 

Am I missing something? Any ideas or anyone seen this before on a CD instance with Sitecore 9?

Added blockquote around the exception message
Source Link
Patrick Barron
  • 1.9k
  • 1
  • 17
  • 23

Exception Details: System.InvalidOperationException: Post condition failed

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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() +110 (Object , Object[] ) +120 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 (Object , Object[] ) +71 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22 Sitecore.Nexus.Web.HttpModule.Application_Start() +161 Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +583 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

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

Exception Details: System.InvalidOperationException: Post condition failed

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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() +110 (Object , Object[] ) +120 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 (Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +161
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +583
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

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

Exception Details: System.InvalidOperationException: Post condition failed

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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() +110 (Object , Object[] ) +120 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 (Object , Object[] ) +71 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22 Sitecore.Nexus.Web.HttpModule.Application_Start() +161 Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +583 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

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

Exception Details: System.InvalidOperationException: Post condition failed

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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() +110 (Object , Object[] ) +120 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 (Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +161
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +583
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

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

Source Link
Toby Gutierrez
  • 1.7k
  • 3
  • 20
  • 30

Post Condition Failed on Sitecore 9 Content Delivery Server

The CD version of Sitecore 9 was installed on our CD server. The error below is typically seen with a SwitchMasterToWeb.config file issue in previous versions:

Post condition failed Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Post condition failed

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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() +110 (Object , Object[] ) +120 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 (Object , Object[] ) +71 Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +479 Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22 Sitecore.Nexus.Web.HttpModule.Application_Start() +161 Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +767 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +583 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +396 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +333

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

In this case, with Sitecore 9 we are getting this error witht the CD version. configuration role for CM is set to "ContentManagement" with CD being "ContentDelivery". To my understanding, this is all you need to do have your CD instance all setup since there is no longer a SwitchMasterToWeb.config in Sitecore 9. Am I missing something? Any ideas or anyone seen this before on a CD instance with Sitecore 9?