Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Deploying to Azure Commerce Manager 9.2.0

Vote:
 

After publishing the commerce manager to Azure site. I am getting the following error. The site is working fine on development machine pointing to the Azure database.

Here are the packages installed






Cannot register a module after the application has been initialized.

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: Cannot register a module after the application has been initialized.

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: Cannot register a module after the application has been initialized.]
   System.Web.DynamicModuleRegistry.Add(Type moduleType) +215
   System.Web.HttpApplication.RegisterModule(Type moduleType) +65
   Microsoft.Web.Infrastructure.DynamicModuleHelper.DynamicModuleUtility.RegisterModule(Type moduleType) +39
   EPiServer.Commerce.Internal.Migration.MigrationInitializationModule.Initialize(InitializationEngine context) +22
   EPiServer.Framework.Initialization.<>c__DisplayClass5.b__4() +19
   EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +43
   EPiServer.Framework.Initialization.ModuleNode.Initialize(InitializationEngine context) +80
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +173

[InitializationException: Initialize action failed for Initialize on class EPiServer.Commerce.Internal.Migration.MigrationInitializationModule, EPiServer.Commerce.Internal.Migration, Version=9.2.0.1226, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +439
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +116
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +475
   EPiServer.Framework.Initialization.InitializationModule.Init(HttpApplication context) +71
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +537
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +364
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +290

[HttpException (0x80004005): Initialize action failed for Initialize on class EPiServer.Commerce.Internal.Migration.MigrationInitializationModule, EPiServer.Commerce.Internal.Migration, Version=9.2.0.1226, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +4531288
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +94
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +191
#141104
Nov 10, 2015 5:10
Vote:
 

Hi,

Make sure your Global.asax is inheriting from EPiServer.Global, like this:

<%@ Application Language="C#" Inherits="EPiServer.Global" %>


Regards,
/Q
#141107
Nov 10, 2015 8:27
Vote:
 

Quan Mai suggestion works

#143175
Jan 14, 2016 10:38
Vote:
 

Hi, 

Along with EPiServer.Global. Also have to add following key to <appSettings>

<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />

and worked for me.


Thanks,

Ranjit J. Vaity

#149281
May 27, 2016 15:26
* 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.