Redirect loop after upgrading to 7.11 to 8.0

Vote:
 

Hello,

I am in the process of upgrading my EpiServer CMS 7.13.2 & Commerce 7.11 to their latest versions. To start with, I have upgraded the CMS -> 8.11 and Commerce -> 8.0 and after running the update-epidatabase in the console, now website results in an infinite loop. It loads the landing page  and keeps refreshing trying to redirect to /Episerver/Commerce/Migrate

I have tried the auto migration by enabling it as below but still no luck.

<add key="AutoMigrateEPiServer" value="true"/>

Is there any other way to disable redirect to the migration page from the login page or manually perform the migration step?

Edit:

For now, in the dev environment, I have forced a login & moved forward. But now I am getting the following error when during the migration.

Update permanent links failed with exception 'System.InvalidOperationException: ExecuteNonQuery: 
CommandText property has not been initialized 
at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) 
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 
at EPiServer.Commerce.Internal.Migration.Steps.UpdatePermanentLinkStep.UpdatePermanentLink(Int32 objectId, CatalogContentType contentType, Guid guid) 
at EPiServer.Commerce.Internal.Migration.Steps.UpdatePermanentLinkStep.MigratePermanentLinks(Dictionary`2 references, IProgressMessenger progressMessenger) 
at EPiServer.Commerce.Internal.Migration.Steps.UpdatePermanentLinkStep.Execute(IProgressMessenger progressMessenger)'.
#228871
Edited, Oct 04, 2020 20:58
Vote:
 

I would suggest to try with last Commerce 8 version - 8.17 IIRC. You don't have to deal with breaking changes while getting as much improvements as you can. Your problem can potentially be resolved as well. 

#228896
Oct 05, 2020 7:26
Vote:
 

Hello Quan,

As per the suggestion Updated CMS -> 9.12.5 & Commerce -> 8.17. Now after building the solution, I am presented with an object reference error in one of the InitializeModules. Below is the error log. 

2020-10-06 01:20:55,804 [145] DEBUG EPiServer.Framework.Initialization.ApplicationDomainInitializer: Adding 'XXXXXXX\modulesbin' to the AppDomain shadow copy path
2020-10-06 01:20:55,847 [145] DEBUG EPiServer.Framework.Initialization.ApplicationDomainInitializer: New shadow copy path : XXXXXXXXXX\bin;XXXXXXXX\modulesbin
2020-10-06 01:20:56,090 [145] DEBUG EPiServer.Global: EPiServer.Global ctor
2020-10-06 01:20:56,163 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Reading from file cache
2020-10-06 01:20:56,168 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: Unity.Mvc3, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
2020-10-06 01:20:56,169 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: Castle.Windsor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc
2020-10-06 01:20:56,170 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: EPiServer.Framework, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
2020-10-06 01:20:56,172 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: NHibernate, Version=1.2.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4
2020-10-06 01:20:56,172 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: EPiServer.Commerce.UI, Version=8.17.0.1004, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
2020-10-06 01:20:56,175 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: Mediachase.Search, Version=8.17.0.1004, Culture=neutral, PublicKeyToken=6e58b501b34abce3
2020-10-06 01:20:56,176 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: EPiServer.Events, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7
2020-10-06 01:20:56,176 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: Mediachase.Search.Extensions, Version=8.17.0.1004, Culture=neutral, PublicKeyToken=6e58b501b34abce3
...snip....
2020-10-06 01:20:56,366 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: HtmlRenderer, Version=1.5.0.6, Culture=neutral, PublicKeyToken=null
2020-10-06 01:20:56,366 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: HtmlRenderer.WinForms, Version=1.5.0.6, Culture=neutral, PublicKeyToken=null
2020-10-06 01:20:56,367 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: HttpWebAdapters, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
2020-10-06 01:20:56,367 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: App_Code, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
2020-10-06 01:20:56,368 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: App_global.asax, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
2020-10-06 01:20:56,368 [145] DEBUG EPiServer.Framework.TypeScanner.CachingAssemblyScanner: Found up-to-date cache types for: App_Browsers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
2020-10-06 01:20:56,369 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Framework is requesting EPiServer.ServiceLocation.ServicePlugInAttributeBase for scanning
2020-10-06 01:20:56,369 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Framework is requesting EPiServer.ServiceLocation.ServiceConfigurationAttribute for scanning
2020-10-06 01:20:56,370 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Framework is requesting EPiServer.Framework.InitializableModuleAttribute for scanning
2020-10-06 01:20:56,370 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Framework is requesting EPiServer.Framework.ModuleDependencyAttribute for scanning
2020-10-06 01:20:56,370 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Framework is requesting EPiServer.Validation.IValidate for scanning
2020-10-06 01:20:56,371 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Framework is requesting EPiServer.Framework.DataAnnotations.TemplateDescriptorAttribute for scanning
2020-10-06 01:20:56,371 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Framework is requesting EPiServer.Web.Hosting.IVirtualPathProviderModule for scanning
2020-10-06 01:20:56,371 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Events is requesting EPiServer.Events.EventsServiceKnownTypeAttribute for scanning
2020-10-06 01:20:56,372 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Common.Framework is requesting EPiServer.Common.Attributes.DataTypes.IAttributeDataTypeProvider for scanning
2020-10-06 01:20:56,372 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Common.Framework is requesting EPiServer.Common.Reporting.IXmlReportArchiveProvider for scanning
2020-10-06 01:20:56,373 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Common.Framework is requesting EPiServer.Common.Web.Extension.IGuiExtensionAttribute for scanning
2020-10-06 01:20:56,373 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Common.Framework is requesting EPiServer.Common.Modules.IModule for scanning
2020-10-06 01:20:56,373 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Common.Framework.Impl is requesting EPiServer.Common.Queries.EntityOwnership for scanning
2020-10-06 01:20:56,374 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Common.Framework.Impl is requesting EPiServer.Common.Web.Extension.GuiExtensionAttributeBase for scanning
2020-10-06 01:20:56,374 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Business.Commerce is requesting EPiServer.Commerce.Marketing.IPromotionProcessor for scanning
2020-10-06 01:20:56,375 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Business.Commerce is requesting EPiServer.Commerce.Order.IOrderProvider for scanning
2020-10-06 01:20:56,375 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Cms.Shell.UI is requesting EPiServer.Cms.Shell.UI.GroupedMetaDataPropertyInfo for scanning
2020-10-06 01:20:56,375 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Data is requesting EPiServer.Data.Entity.IEntity for scanning
2020-10-06 01:20:56,376 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.PlugIn.PlugInAttribute for scanning
2020-10-06 01:20:56,376 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.DataAnnotations.ContentTypeAttribute for scanning
2020-10-06 01:20:56,376 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.DataAnnotations.PermissionTypesAttribute for scanning
2020-10-06 01:20:56,377 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.DataAnnotations.GroupDefinitionsAttribute for scanning
2020-10-06 01:20:56,377 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.DataAbstraction.Migration.MigrationStep for scanning
2020-10-06 01:20:56,377 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.Web.IDisplayResolution for scanning
2020-10-06 01:20:56,377 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.Web.IRenderTemplate for scanning
2020-10-06 01:20:56,378 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.Core.IPageSource`1[[EPiServer.Core.PageData, EPiServer, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]] for scanning
2020-10-06 01:20:56,378 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.PageBase for scanning
2020-10-06 01:20:56,378 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.Web.Mvc.IViewTemplateModelRegistrator for scanning
2020-10-06 01:20:56,379 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer is requesting EPiServer.Web.DisplayChannel for scanning
2020-10-06 01:20:56,380 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Shell is requesting EPiServer.Shell.ViewComposition.ComponentAttribute for scanning
2020-10-06 01:20:56,381 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Shell is requesting EPiServer.Shell.Gadgets.GadgetAttribute for scanning
2020-10-06 01:20:56,381 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: EPiServer.Shell is requesting System.Web.Mvc.IController for scanning
2020-10-06 01:20:56,381 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: Mediachase.BusinessFoundation.Data is requesting Mediachase.BusinessFoundation.Data.Meta.Management.TriggerActionAttribute for scanning
2020-10-06 01:20:56,382 [145] DEBUG EPiServer.Framework.TypeScanner.ReflectionAssemblyScanner: Mediachase.BusinessFoundation.Data is requesting Mediachase.BusinessFoundation.Data.Meta.Management.TriggerConditionAttribute for scanning
2020-10-06 01:20:56,674 [145] DEBUG EPiServer.ServiceLocation.ServiceContainerInitialization: Attribute defined dependencies have been registered with IOC container.
2020-10-06 01:20:56,807 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: InitializationState: transition from 'PreInitialize' to 'Initializing'.
2020-10-06 01:20:56,819 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Enterprise.DynamicDataTransferHandler, EPiServer.Enterprise, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:56,820 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Framework.Localization.ProviderBasedLocalizationService, EPiServer.Framework, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:56,841 [145] DEBUG EPiServer.Framework.Cache.HttpRuntimeCache: New instance of HttpRuntimeCache created.
2020-10-06 01:20:57,123 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Initialization.Internal.ContentCacheInitialization, EPiServer, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,127 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Initialization.Internal.DisplayChannelInitialization, EPiServer, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,142 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.MirroringService.ExternalDataTracker, EPiServer.Enterprise, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,143 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.MirroringService.MirroringMonitoring.MirroringMonitoringModule, EPiServer.Enterprise, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,143 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Personalization.VisitorGroups.VisitorGroupHttpInitialization, EPiServer.ApplicationModules, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,152 [145] INFO EPiServer.Search.SearchInitialization: Search Module Started!
2020-10-06 01:20:57,152 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Search.SearchInitialization, EPiServer.ApplicationModules, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,153 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.ServiceLocation.ServiceContainerInitialization, EPiServer.Framework, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,153 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Web.Routing.Internal.RoutingInitialization, EPiServer, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,153 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class Mediachase.Search.SearchInitialization, Mediachase.Search, Version=8.17.0.1004, Culture=neutral, PublicKeyToken=6e58b501b34abce3'
2020-10-06 01:20:57,170 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class SynnexB2B.AU.Web.BundleConfig, SynnexB2B.AU.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
2020-10-06 01:20:57,170 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class SynnexB2B.Framework.Web.Business.Initialization.DependencyResolverInitialization, SynnexB2B.Framework.Web.Business, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
2020-10-06 01:20:57,290 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Data.DataInitialization, EPiServer.Data, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,577 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Enterprise.EnterpriseInitialization, EPiServer.Enterprise, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,609 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: Initialize action successful for 'Initialize on class EPiServer.Events.EventsInitialization, EPiServer.Events, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
2020-10-06 01:20:57,642 [145] DEBUG EPiServer.Shell.Modules.ShellZipArchiveVirtualPathProviderModule: Registering ZipArchiveVirtualPathProvider for module 'CMS'
2020-10-06 01:20:57,643 [145] DEBUG EPiServer.Shell.Modules.ShellZipArchiveVirtualPathProviderModule: Registering ZipArchiveVirtualPathProvider for module 'Commerce'
2020-10-06 01:20:57,643 [145] DEBUG EPiServer.Shell.Modules.ShellZipArchiveVirtualPathProviderModule: Registering ZipArchiveVirtualPathProvider for module 'EPiServer.Commerce.Shell'
2020-10-06 01:20:57,643 [145] DEBUG EPiServer.Shell.Modules.ShellZipArchiveVirtualPathProviderModule: Registering ZipArchiveVirtualPathProvider for module 'EPiServer.Packaging.UI'
2020-10-06 01:20:57,644 [145] DEBUG EPiServer.Shell.Modules.ShellZipArchiveVirtualPathProviderModule: Registering ZipArchiveVirtualPathProvider for module 'Shell'
2020-10-06 01:20:57,669 [145] ERROR EPiServer.Framework.Initialization.InitializationEngine: Initialize action failed for 'Initialize on class EPiServer.Framework.FrameworkInitialization, EPiServer.Framework, Version=9.12.5.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
System.NullReferenceException: Object reference not set to an instance of an object.
   at EPiServer.Web.Hosting.VirtualPathRegistrationHandler.CreateVirtualPathProviderInstance(ProviderSettings providerSettings)
   at EPiServer.Web.Hosting.VirtualPathRegistrationHandler.RegisterVirtualPathProvidersFromSettings(ProviderSettingsCollection settings)
   at EPiServer.Web.Hosting.VirtualPathRegistrationHandler.RegisterVirtualPathProviders(InitializationEngine context, ProviderSettingsCollection settings)
   at EPiServer.Framework.FrameworkInitialization.RegisterVirtualPathProviders(InitializationEngine context)
   at EPiServer.Framework.FrameworkInitialization.Initialize(InitializationEngine context)
   at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
   at EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()
System.NullReferenceException: Object reference not set to an instance of an object.
   at EPiServer.Web.Hosting.VirtualPathRegistrationHandler.CreateVirtualPathProviderInstance(ProviderSettings providerSettings)
   at EPiServer.Web.Hosting.VirtualPathRegistrationHandler.RegisterVirtualPathProvidersFromSettings(ProviderSettingsCollection settings)
   at EPiServer.Web.Hosting.VirtualPathRegistrationHandler.RegisterVirtualPathProviders(InitializationEngine context, ProviderSettingsCollection settings)
   at EPiServer.Framework.FrameworkInitialization.RegisterVirtualPathProviders(InitializationEngine context)
   at EPiServer.Framework.FrameworkInitialization.Initialize(InitializationEngine context)
   at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
   at EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()
2020-10-06 01:20:57,673 [145] DEBUG EPiServer.Framework.Initialization.InitializationEngine: InitializationState: transition from 'Initializing' to 'InitializeFailed'.
2020-10-06 01:20:57,710 [162] INFO EPiServer.Events.Remote.EventReplicationWCFProviders: EndpointElement RemoteEventServiceClientEndPoint is read with the Address soap.udp://239.255.255.19:5000/RemoteEventService
2020-10-06 01:20:57,710 [162] INFO EPiServer.Events.Remote.EventReplicationWCFProviders: Adds the Event Replication provider.
2020-10-06 01:20:57,726 [162] INFO EPiServer.Events.Remote.EventReplicationWCFProviders: A proxy is created for the Event Replication
2020-10-06 01:20:57,760 [162] INFO EPiServer.Events.Providers.WcfEventProvider: Successfully created service host for event replication class
2020-10-06 01:21:07,686 [146] WARN EPiServer.Framework.Initialization.Internal.ShutdownTracker: ASP.NET shutting down due to InitializationError
2020-10-06 01:21:07,687 [146] INFO EPiServer.Events.Remote.EventReplicationWCFProviders: The EventReplicationWCFProviders is UnInitialized
#228925
Oct 05, 2020 20:04
Vote:
 

How does your episerverframework.config look like? Seems it has a faulty config somewhere

#228927
Oct 05, 2020 20:49
Vote:
 

Hello Quan,

Thanks for working on this with me. Following your tip, removed the incorrect virtualpathproviders from the episerver.framework config and the site loaded without any errors but after logging in, I was presented with the migration page again and it failed at the same step again with the same error.

3:18:35 AM: Completed migration step: Update Permanent Link
3:18:35 AM: Update permanent links failed with exception 'System.InvalidOperationException: ExecuteNonQuery: CommandText property has not been initialized at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at EPiServer.Commerce.Internal.Migration.Steps.UpdatePermanentLinkStep.UpdatePermanentLink(Int32 objectId, CatalogContentType contentType, Guid guid) at EPiServer.Commerce.Internal.Migration.Steps.UpdatePermanentLinkStep.MigratePermanentLinks(Dictionary`2 references, IProgressMessenger progressMessenger) at EPiServer.Commerce.Internal.Migration.Steps.UpdatePermanentLinkStep.Execute(IProgressMessenger progressMessenger)'.
3:18:35 AM: Done getting guids from properties and soft links.
3:18:35 AM: Getting guids from properties and soft links.
3:18:35 AM: Starting migration step: Update Permanent Link

Is there any way I can skip this step or mark it as completed and move forward? 

#228932
Oct 05, 2020 21:52
Vote:
 

Hello Quan,

I was able to skip the migration step by updating the Boolean02 value to 1 in 'tblBigTable' for the string01 =>  EPiServer.Commerce.Internal.Migration.Steps.UpdatePermanentLinkStep'. The migration was successful and was able to load & login to the site successfully.

Are there any repercussions for doing this? Can I do this in production as well if I ran into the same problem?

Thanks.

#228970
Oct 06, 2020 8:14
Vote:
 

I tried to NOT tell you that "workaround" because it might compromise your data integrity. The migrations are ensured to run for a reason. However the version you are using is just too old for me to have a meaningful advice ...

#228976
Oct 06, 2020 8:39
Vote:
 

Hello Quan,

I upgraded the CMS to its latest offering -> 11.19 and Commerce to 11.5.0. Fixed all deprecated errors and the solution is building fine but Now I ran into "Unable to cast object of type 'System.String' to type 'EPiServer.Core.XhtmlString'" Stacktrace below.

System.AggregateException: One or more errors occurred. ---> System.InvalidCastException: Unable to cast object of type 'System.String' to type 'EPiServer.Core.XhtmlString'.
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelMethods.GetValueOrDefault[T](PropertyDataCollection propertyDataCollection, String propertyName, Boolean defaultOnIsNull)
   at EpiCommercePortal.Framework.Web.PageType.ProductSearchPage_DynamicProxy.MakeReadOnly()
   at EPiServer.DataAccess.Internal.ContentDB.FinalizeContent(IContent content)
   at EPiServer.DataAccess.Internal.ContentLoadDB.LoadContentInternal(ContentReference contentLink, Int32 languageBranchId, DbDataReader reader)
   at EPiServer.DataAccess.Internal.ContentLoadDB.<>c__DisplayClass4_0.<LoadVersion>b__0()
   at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass31_0`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Core.ContentProvider.<>c__DisplayClass121_0.<LoadContentFromCacheOrRepository>b__0()
   at EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThroughWithWait[T](IObjectInstanceCache cache, String cacheKey, Func`1 readValue, Func`2 evictionPolicy)
   at EPiServer.Core.Internal.ContentInstanceCache.ReadThrough(ContentReference contentLink, String selectedLanguage, Func`1 readValue)
   at EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector)
   at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItem(ContentProvider provider, ContentReference contentLink, LoaderOptions loaderOptions)
   at EPiServer.Core.Internal.DefaultContentLoader.TryGet[T](ContentReference contentLink, LoaderOptions loaderOptions, T& content)
   at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.ValidateChangeOfModelType(PropertyDefinitionModel propertyModel, String modelName)
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.SetStateForPropertyDefinitionModels(ContentTypeModel model)
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.<AnalyzeProperties>b__15_0(ContentTypeModel model)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body)
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.AnalyzeProperties()
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.Sync(Boolean commitChanges)
   at EPiServer.Initialization.Internal.ModelSyncInitialization.Initialize(InitializationEngine context)
   at EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key)
   at EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context)
   at EPiServer.Framework.Initialization.InitializationEngine.InitializeModules()
---> (Inner Exception #0) System.InvalidCastException: Unable to cast object of type 'System.String' to type 'EPiServer.Core.XhtmlString'.
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentModelMethods.GetValueOrDefault[T](PropertyDataCollection propertyDataCollection, String propertyName, Boolean defaultOnIsNull)
   at EpiCommercePortal.Framework.Web.PageType.ProductSearchPage_DynamicProxy.MakeReadOnly()
   at EPiServer.DataAccess.Internal.ContentDB.FinalizeContent(IContent content)
   at EPiServer.DataAccess.Internal.ContentLoadDB.LoadContentInternal(ContentReference contentLink, Int32 languageBranchId, DbDataReader reader)
   at EPiServer.DataAccess.Internal.ContentLoadDB.<>c__DisplayClass4_0.<LoadVersion>b__0()
   at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass31_0`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Core.ContentProvider.<>c__DisplayClass121_0.<LoadContentFromCacheOrRepository>b__0()
   at EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThroughWithWait[T](IObjectInstanceCache cache, String cacheKey, Func`1 readValue, Func`2 evictionPolicy)
   at EPiServer.Core.Internal.ContentInstanceCache.ReadThrough(ContentReference contentLink, String selectedLanguage, Func`1 readValue)
   at EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector)
   at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItem(ContentProvider provider, ContentReference contentLink, LoaderOptions loaderOptions)
   at EPiServer.Core.Internal.DefaultContentLoader.TryGet[T](ContentReference contentLink, LoaderOptions loaderOptions, T& content)
   at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.ValidateChangeOfModelType(PropertyDefinitionModel propertyModel, String modelName)
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.SetStateForPropertyDefinitionModels(ContentTypeModel model)
   at EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.<AnalyzeProperties>b__15_0(ContentTypeModel model)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>)<---

Class Definitions:

 public abstract class SitePageData : PageData
    {
        [CultureSpecific]
        [Display(Name = "Browser Title",
       Description = "Browser title of the Public content page",
       GroupName = TabNames.PageHeader, Order = 1)]
        public virtual string BrowserTitle { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Page Title",
            Description = "Page Title",
            GroupName = TabNames.PageHeader,
            Order = 2)]
        public virtual XhtmlString PageTitle { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Show Page Title?",
            Description = "Show PageTitle",
            GroupName = TabNames.PageHeader,
            Order = 3)]
        public virtual bool ShowPageTitle { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Icon CSS",
            Description = "Cascading Style used to display the icon next to the title",
            GroupName = TabNames.PageHeader,
            Order = 1)]
        public virtual string IConCss { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Back Button CSS",
            Description = "Cascading style to display the back button",
            GroupName = TabNames.PageHeader,
            Order = 1)]
        public virtual string BackButtonCss { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Show Back Button?",
            Description = "Check this option to show backbutton on page",
            GroupName = TabNames.PageHeader,
            Order = 1)]
        public virtual bool ShowBackButton { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Full Page Top Banner Area",
            Description = "Banner in this area will be displayed with full page width",
            GroupName = TabNames.Banners,
            Order = 100)]
        public virtual ContentArea TopContentArea { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Left Skyscrapper Area",
            Description = "Left Content Area for adding skyscrapper banner blocks",
            GroupName = TabNames.SkyScrappers,
            Order = 101)]

        public virtual ContentArea LeftContenArea { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Right SkyScrapper Area",
            Description = "Right Content Area for adding skyscrapper banner blocks",
            GroupName = TabNames.SkyScrappers,
            Order = 102)]
        public virtual ContentArea RightContenArea { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Page Content Top Banner Area",
            Description = "Page Content Area displays the banner with 70% width leaving the rest to LHS or RHS",
            GroupName = TabNames.Banners,
            Order = 103)]
        public virtual ContentArea HeaderContentArea { get; set; }


        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Page Content Banner Area",
            Description = "Page Content Area displays the botton banner with 70% width leaving the rest to LHS or RHS",
            GroupName = TabNames.Banners,
            Order = 104)]
        public virtual ContentArea BottomContentArea { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "LHS Panel",
            Description = "LHS panel - to add blocks",
            GroupName = TabNames.Banners,
            Order = 105)]
        public virtual ContentArea LHSPanel { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "RHS Panel",
            Description = "RHS panel - to add blocks ",
            GroupName = TabNames.Banners,
            Order = 106)]
        public virtual ContentArea RHSPanel { get; set; }

        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "Virtual Presenter Script",
            Description = "Virtual presenter script ",
            GroupName = SystemTabNames.Content,
            Order = 1000)]
        public virtual XhtmlString VirtualPresenterScript { get; set; }

        #region Metadata

        /// <summary>
        /// Gets or sets the meta keywords for the page
        /// </summary>
        [Display(
        GroupName = "MetaData",
        Order = 200)]
        [CultureSpecific]
        public virtual string MetaKeywords { get; set; }

        /// <summary>
        /// Gets or sets the meta description for the page
        /// </summary>
        [Display(
        GroupName = "MetaData",
        Order = 300)]
        [CultureSpecific]
        //[UIHint(UIHint.Textarea)]
        public virtual string MetaDescription { get; set; }        
        

        #endregion

        public override void SetDefaultValues(ContentType contentType)
        {
            base.SetDefaultValues(contentType);
            //Default values are set here
            this.BackButtonCss = "back-prev";


        }


    }
public class ProductSearchPage : SitePageData
    {
        [CultureSpecific]
        [Editable(true)]
        [Display(
            Name = "SearchPanel Left banner Area",
            Description = "The main body will be shown in the main content area of the page, using the XHTML-editor you can insert for example text, images and tables.",
            GroupName = SystemTabNames.Content,
            Order = 2)]
        public virtual ContentArea SearchPanelLeftBlock { get; set; }


        [CultureSpecific]
        [Editable(true)]
        [Display(Name = "Menu Background Color", Description = "Menu Background Color", GroupName = SystemTabNames.Content, Order = 10)]
        public virtual XhtmlString MenuBackgroudColor { get; set; }

        [CultureSpecific]
        [Display(Name = "Download contract", Description = "Download contract", GroupName = SystemTabNames.Content, Order = 20)]
        [UIHint(EPiServer.Web.UIHint.MediaFile)]
        public virtual ContentReference DownloadContract { get; set; }
    }

Thanks

#229065
Edited, Oct 07, 2020 11:05
Vote:
 

Hello Quan,

Fixed this issue. Identified there was a conflict between the property type declared in the pagedata and DB. 

Now the migration failed at Migrates published Catalog Content. Below is the log

6:46:19 PM: Migrates published Catalog Content has failed with exception 'System.Data.SqlClient.SqlException (0x80131904): 
Please create a master key in the database or open the master key in the session before performing this operation. The key 'Mediachase_ECF50_MDP_Key' is not open. Please open the key before using it. 
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) 
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) 
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) 
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) 
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) 
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) 
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method) at Mediachase.Data.Provider.SqlDataProvider.ExecuteNonExec(DataCommand command) 
at Mediachase.MetaDataPlus.Common.DBHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, Int32 commandTimeout, DataParameter[] commandParameters) 
at EPiServer.Commerce.Internal.Migration.Steps.MigratePublishedContentStep.MigratePropertyData(DataTable propertyData, DataTable contentExData, String tableName, DataTable idsToDelete) 
at EPiServer.Commerce.Internal.Migration.Steps.MigratePublishedContentStep.MigrateCatalogContent(MetaClass metaClass, IList`1 languages) 
at EPiServer.Commerce.Internal.Migration.Steps.MigratePublishedContentStep.Execute(IProgressMessenger progressMessenger) ClientConnectionId:57992df1-76bf-46f1-86de-b97895c29092 Error Number:15581,State:7,Class:16'.

Thanks

#229093
Oct 07, 2020 13:31
Vote:
 

Nice. didn't know you can upgrade to fairly new version - they are much better than 8.x. But if you have gone that far, aim for 13.25 as well, because it's even better.

Regarding the issue, try this out https://world.episerver.com/forum/developer-forum/Episerver-Commerce/Thread-Container/2015/11/upgrade-mediachase_ecf50_mdp_key-error/ 

#229099
Oct 07, 2020 14:51
Vote:
 

That is the plan.. to update EpiServer (CMS & Commerce) to the new latest version. :) 

Thanks for your support, I was able to fix that issue, but now another migration step failed. Stacktrace below.

2020-10-08 11:13:44,629 [191] DEBUG Mediachase.Search.SearchManager: Getting the type "EpiCommercePortal.Commerce.Search.Extensions.AdvancedCatalogIndexer, SynnexB2B.Commerce.Search.Extensions".
2020-10-08 11:13:44,629 [190] TRACE EPiServer.Data.Providers.Internal.SqlDatabaseExecutor: Opening a new transaction-less connection
2020-10-08 11:13:44,630 [190] TRACE EPiServer.Data.Providers.Internal.ConnectionContext: Opening Connection
2020-10-08 11:13:44,632 [190] DEBUG EPiServer.Data.Dynamic.Providers.Internal.DbDataStoreProvider: LINQ Expression:
value(EPiServer.Data.Dynamic.Internal.DynamicDataStoreOrderedQueryable`1[EPiServer.Commerce.Internal.Migration.MigrationStepInfo]).SingleOrDefault(x => (x.MigrationStepTypeFullName == value(EPiServer.Commerce.Internal.Migration.MigrationStore+<>c__DisplayClass6_0).stepType.FullName))
Generated SQL: SELECT TOP(2) "EPiServer.Commerce.Internal.Migration.MigrationStepInfo".Id, "EPiServer.Commerce.Internal.Migration.MigrationStepInfo".ItemType, "EPiServer.Commerce.Internal.Migration.MigrationStepInfo"."LastRun", "EPiServer.Commerce.Internal.Migration.MigrationStepInfo"."MigrationStepTypeFullName", "EPiServer.Commerce.Internal.Migration.MigrationStepInfo"."Success" FROM   [dbo].[VW_EPiServer.Commerce.Internal.Migration.MigrationStepInfo] as "EPiServer.Commerce.Internal.Migration.MigrationStepInfo"  
WHERE "EPiServer.Commerce.Internal.Migration.MigrationStepInfo".[MigrationStepTypeFullName]  =  @Param0

2020-10-08 11:13:44,632 [191] ERROR EPiServer.Commerce.Internal.Migration.MigrationProgressMessenger: Migrate indexing queue step has failed with exception 'System.NullReferenceException: Object reference not set to an instance of an object.
   at Mediachase.Search.SearchManager.<CreateSearchIndexBuilders>d__15.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at EPiServer.Commerce.Internal.Migration.Steps.MigrateIndexingQueueStep.Execute(IProgressMessenger progressMessenger)'.

Mediachase.Search.Config

<Indexers basePath="appdata\SearchIndex">
    <add name="catalog" type="EpiCommercePortal.Commerce.Search.Extensions.AdvancedCatalogIndexer, EpiCommercePortal.Commerce.Search.Extensions" />
  </Indexers>

We are using a custom indexer, but also tested this by removing all the custom code and by just calling the base class -> base.OnCatalogEntryIndex(ref document, entry, language);

#229127
Oct 08, 2020 5:58
Vote:
 

I have no clue, but you can try to change the basePath to [appDataPath]\SearchIndex ?

#229130
Oct 08, 2020 6:52
Vote:
 

Actually, the base path is an absolute path to the search index, something like 'C:\Path\to\index'. Any other suggestions, please. Stuck on this step for more than 4 hours now! 

And will it be possible to tell me what this migration step does? Is it ok to skip this and move forward or will it cause any other issues?

/Thanks

#229133
Oct 08, 2020 7:11
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.