We are migrating to Sitecore 10.1 (Full Azure Paas), we have added a new publishing target following this documentation (link).
All databases were created using ARM template, we have a blue/green setup.
We are not able to publish or browse the secondary publishing target via CMS.We get the same issue also when trying to run Indexes or use dbBrowser on that DB. Note that Core, Master and Web work perfectly fine.
Here an error example when trying to switch view to the staging database from desktop:
[ArgumentNullException: Value cannot be null.Parameter name: item]Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName) +63Sitecore.Data.Managers.ItemProvider.ApplySecurity(Item item, SecurityCheck securityCheck) +33Sitecore.Data.Managers.DefaultItemManager.GetRootItem(Language language, Version version, Database database) +110Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.ResolvePath(String itemPath, Database database) +134Sitecore.Nexus.Data.DataCommands.ResolvePathCommand.Execute(String itemPath, Database database) +493Sitecore.Data.Engines.EngineCommand`2.Execute() +93Sitecore.Data.Managers.ItemProvider.GetItem(String itemPath, Language language, Version version, Database database, SecurityCheck securityCheck) +149Sitecore.ContentTesting.Pipelines.ItemProvider.GetItem.GetItemUnderTestProcessor.Process(GetItemArgs args) +128(Object , Object ) +14Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +490Sitecore.Data.Managers.DefaultItemManager.GetItem(String itemPath, Language language, Version version, Database database, SecurityCheck securityCheck) +305Sitecore.Data.Managers.DefaultItemManager.GetItem(String itemPath, Language language, Version version, Database database) +147Sitecore.Data.Managers.ItemManager.GetItem(String itemPath, Language language, Version version, Database database) +154Sitecore.Globalization.DictionaryDomain.GetDomainDefinitionItem(Database database, String name)+188Sitecore.Globalization.DictionaryDomain.TryParse(String domainDefinition, Database database, DictionaryDomain& domain) +416Sitecore.Globalization.DictionaryDomain.GetDefaultDomain(Database database) +134Sitecore.Pipelines.GetTranslation.TryGetFromContextDatabase.Process(GetTranslationArgs args) +149(Object , Object ) +9Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +490Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, Boolean failIfNotExists) +36Sitecore.Globalization.DefaultTranslate.TextByLanguage(String domainName, TranslateOptions options, String key, Language language, String defaultValue, Object[] parameters) +416Sitecore.Globalization.DefaultTranslate.TextByLanguage(String key, Language language, String defaultValue, Object[] parameters) +161Sitecore.Globalization.DefaultTranslate.TextByLanguage(String key, Language language, String defaultValue) +162Sitecore.Globalization.DefaultTranslate.TextByLanguage(String key, Language language) +150Sitecore.Web.UI.HtmlControls.Literal.set_Text(String value) +143[TargetInvocationException: Exception has been thrown by the target of an invocation.]System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +132System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) +36Sitecore.Reflection.ReflectionUtil.SetProperty(Object obj, PropertyInfo property, Object value) +277Sitecore.Reflection.ReflectionUtil.SetProperty(Object obj, String name, Object value) +268Sitecore.Web.UI.XmlControls.ControlFactory.SetProperties(Control control, Object[] properties) +771Sitecore.Web.UI.XmlControls.XmlControl.AddControl(Control control, Control parent, String placeholderID, String[] properties) +54Sitecore.Web.UI.XmlControls.WebPanel_a_265.Initialize() +865Sitecore.Web.UI.XmlControls.XmlControl..ctor() +84[TargetInvocationException: Exception has been thrown by the target of an invocation.]System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +297Sitecore.Reflection.ReflectionUtil.CreateObject(Type type) +109Sitecore.Web.UI.XmlControls.ControlFactory.GetControl(Control parent, String controlName, String mode, Object[] properties, AllowGenericControl allowGeneric) +56Sitecore.Web.UI.XmlControls.FormPage_a_264.Initialize() +183Sitecore.Web.UI.XmlControls.XmlControl..ctor() +84Sitecore.Web.UI.XmlControls.FormPage_a_264..ctor() +16[TargetInvocationException: Exception has been thrown by the target of an invocation.]System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +297Sitecore.Reflection.ReflectionUtil.CreateObject(Type type) +109Sitecore.Web.UI.XmlControls.ControlFactory.GetControl(Control parent, String controlName, String mode, Object[] properties, AllowGenericControl allowGeneric) +56Sitecore.Web.UI.XmlControls.Shell_a_263.Initialize() +1829Sitecore.Web.UI.XmlControls.XmlControl..ctor() +84[TargetInvocationException: Exception has been thrown by the target of an invocation.]System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +297Sitecore.Reflection.ReflectionUtil.CreateObject(Type type) +109Sitecore.Web.UI.XmlControls.ControlFactory.GetControl(Control parent, String controlName, String mode, Object[] properties, AllowGenericControl allowGeneric) +56Sitecore.Web.UI.XmlControls.DucatShell_a_262.Initialize() +115Sitecore.Web.UI.XmlControls.XmlControl..ctor() +84[TargetInvocationException: Exception has been thrown by the target of an invocation.]System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +297Sitecore.Reflection.ReflectionUtil.CreateObject(Type type) +109Sitecore.Web.UI.XmlControls.ControlFactory.GetControl(Control parent, String controlName, String mode, Object[] properties, AllowGenericControl allowGeneric) +56Sitecore.Web.UI.XmlControls.ControlFactory.GetControl(String controlName) +48Sitecore.Shell.DefaultPage.OnInit(EventArgs e) +117System.Web.UI.Control.InitRecursive(Control namingContainer) +454System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1719
The added patches seems to load correctly, here a view of showconfig.aspx:
Property Store Provider:
<PropertyStoreProvider patch:source="Sitecore.PropertyStore.config" defaultStore="web"><store name="web" prefix="web" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.SqlServerPropertyStore, Sitecore.Kernel"><param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/><param type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" resolve="true"/><param type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" resolve="true"/></store><store name="webstaging" prefix="webstaging" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.SqlServerPropertyStore, Sitecore.Kernel" patch:source="Baseline.Foundation.SitecoreExtensions.config"><param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/><param type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" resolve="true"/><param type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" resolve="true"/></store><store name="master" prefix="master" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.SqlServerPropertyStore, Sitecore.Kernel"><param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/><param type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" resolve="true"/><param type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" resolve="true"/></store><store name="core" prefix="core" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.SqlServerPropertyStore, Sitecore.Kernel"><param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/><param type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" resolve="true"/><param type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" resolve="true"/></store></PropertyStoreProvider>
Event Queue Provider:
<eventQueueProvider patch:source="Sitecore.Eventing.config" defaultEventQueue="web"><eventQueue name="web" type="Sitecore.Data.Eventing.SqlServerEventQueue, Sitecore.Kernel"><param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/><param ref="PropertyStoreProvider/store[@name='$(name)']"/></eventQueue><eventQueue name="webstaging" type="Sitecore.Data.Eventing.SqlServerEventQueue, Sitecore.Kernel" patch:source="Baseline.Foundation.SitecoreExtensions.config"><param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/><param hint="" ref="PropertyStoreProvider/store[@name='$(name)']"/></eventQueue><eventQueue name="master" type="Sitecore.Data.Eventing.SqlServerEventQueue, Sitecore.Kernel"><param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/><param hint="" ref="PropertyStoreProvider/store[@name='$(name)']"/></eventQueue><eventQueue name="core" type="Sitecore.Data.Eventing.SqlServerEventQueue, Sitecore.Kernel"><param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/><param ref="PropertyStoreProvider/store[@name='$(name)']"/></eventQueue></eventQueueProvider>
Data Base Definition:
<database id="webstaging" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel" singleInstance="true" patch:source="Baseline.Foundation.SitecoreExtensions.config"><param desc="name">$(id)</param><icon>Images/database_web.png</icon><securityEnabled>true</securityEnabled><dataProviders hint="list:AddDataProvider"><dataProvider type="Sitecore.Data.DataProviders.CompositeDataProvider, Sitecore.Kernel"><param hint="list" desc="readOnlyDataProviders"><protobufItems type="Sitecore.Data.DataProviders.ReadOnly.Protobuf.ProtobufDataProvider, Sitecore.Kernel"><filePaths hint="list"><filePath>D:\home\site\wwwroot\App_Data/items/$(id)</filePath></filePaths></protobufItems></param><param desc="headProvider"><dataProvider ref="dataProviders/main" param1="$(id)"><disableGroup>publishing</disableGroup><prefetch hint="raw:AddPrefetch"><childLimit>100</childLimit><logStats>false</logStats><template desc="template">{AB86861A-6030-46C5-B394-E8F99E8B87DB}</template><template desc="template section">{E269FBB5-3750-427A-9149-7AA950B49301}</template><template desc="template field">{455A3E98-A627-4B40-8035-E683A0331AC7}</template><template desc="language">{F68F13A6-3395-426A-B9A1-FA2DC60D94EB}</template><template desc="device">{B6F7EEB4-E8D7-476F-8936-5ACE6A76F20B}</template><item desc="root">{11111111-1111-1111-1111-111111111111}</item><children desc="main sections">{11111111-1111-1111-1111-111111111111}</children><cacheSize>100MB</cacheSize><template desc="alias">{54BCFFB7-8F46-4948-AE74-DA5B6B5AFA86}</template><template desc="layout">{3A45A723-64EE-4919-9D41-02FD40FD1466}</template><template desc="Sublayout">{0A98E368-CDB9-4E1E-927C-8E0C24A003FB}</template><template desc="xsl rendering">{F1F1D639-4F54-40C2-8BE0-81266B392CEB}</template><item desc="home">{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}</item><children desc="main items">{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}</children><!-- MVC --><template desc="Controller rendering">{2A3E91A0-7987-44B5-AB34-35C2D9DE83B9}</template><template desc="Item rendering">{86776923-ECA5-4310-8DC0-AE65FE88D078}</template><template desc="Rendering">{92D4A8C4-5754-4E1A-96A6-095BD193E12B}</template><template desc="Sublayout">{0A98E368-CDB9-4E1E-927C-8E0C24A003FB}</template><template desc="View rendering">{99F8905D-4A87-4EB8-9F8B-A9BEBFB3ADD6}</template><!-- Rules --><template desc="Action">{F90052A5-B4E6-4E6D-9812-1E1B88A6FCEA}</template><template desc="Condition">{F0D16EEE-3A05-4E43-A082-795A32B873C0}</template><template desc="Conditional Rendering Rule">{550B5CEF-242C-463F-8ED5-983922A39863}</template><template desc="Content Editor Warning Rule">{71A2C881-FBB3-4A23-A187-7FD50A20F924}</template><template desc="Insert Options Rule">{664E5035-EB8C-4BA1-9731-A098FCC9127A}</template><template desc="Rule">{D9BDF22F-6E17-47F3-AB64-49C717BA92DA}</template><template desc="Script">{AB6DD55D-75E3-4A02-9793-7054ED90FCB6}</template><template desc="Element Folder">{54DAE7CD-BFD8-4E69-9679-75F2AE9F9034}</template><template desc="Rule Elements Visibility Rule">{271F5CF1-95C7-474D-9F04-06C6EBB20D8F}</template><template desc="Rules Context Folder">{DDA66314-03F3-4C89-84A9-39DFFB235B06}</template><template desc="Rules Folder">{8EA2CF67-4250-47A2-AECA-4F70FD200DC7}</template><template desc="Tag">{1A9B6300-4652-477C-A4B5-B2A64E86B29F}</template><template desc="Tags Definition">{854BA861-63EA-4A0C-8C7B-541E9A7EC4C1}</template><template desc="Tags Definitions Folder">{96C8E5DD-63C3-496B-A97C-A3E37E1DACBA}</template><template desc="Visibility">{AA91A868-02F2-41D3-8B78-1CAD91B4DCAE}</template><template desc="Validation Result">{29045375-C15F-4E69-B873-75C3F5C1814B}</template><template desc="Validation Rule">{0512BDE9-5696-42C4-8C7D-B349EDA9CEF9}</template></prefetch></dataProvider></param></dataProvider></dataProviders><PropertyStore ref="PropertyStoreProvider/store[@name='$(id)']"/><remoteEvents.EventQueue><obj ref="eventing/eventQueueProvider/eventQueue[@name='$(id)']"/></remoteEvents.EventQueue><archives hint="raw:AddArchive"><archive name="archive"/><archive name="recyclebin"/></archives><cacheSizes hint="setting"><data>100MB</data><items>50MB</items><paths>2500KB</paths><itempaths>50MB</itempaths><standardValues>2500KB</standardValues></cacheSizes><BlobStorage hint="raw:AddBlobStorage"><providers default="classic"><provider name="classic" type="Sitecore.Data.Blobs.ClassicSqlBlobProvider, Sitecore.Kernel"><param desc="databaseName">$(id)</param></provider></providers></BlobStorage></database>
Connection strings:
<add name="web" connectionString="*********" /><add name="webstaging" connectionString="*********" />