Try our conversational search powered by Generative AI!

EPiServer.Commerce.UI.CustomerService Issue

SG
SG
Vote:
 

Hello,

We just upgraded to the commerce version 13.27.0 and started getting the below error: If I delete the "EPiServer.Commerce.UI.CustomerService.zip" from  modules > _protected website works fine but Commerce UI does not work in the backend (as expected) but when adding the file back - error back again. Appreciate any help.

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
   System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0
   System.Reflection.Assembly.GetTypes() +113
   EPiServer.Commerce.UI.CustomerService.Services.RouteRegistry.RegisterRoutes(Assembly assembly, String routePrefix, HttpRouteCollection routes) +114
   System.Web.Http.GlobalConfiguration.Configure(Action`1 configurationCallback) +46
   EPiServer.Commerce.UI.CustomerService.Initialization.InitializationModule.Global_RoutesRegistering(Object sender, RouteRegistrationEventArgs e) +381
   EPiServer.Global.OnRoutesRegistrating(RouteCollection routes) +78
   EPiServer.Global..ctor() +174
   ASP.global_asax..ctor() +46

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +142
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +107
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1476
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +186
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +80
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +182
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +724
#294422
Jan 10, 2023 11:56
Vote:
 

If you could catch the exception somehow, that would be great. In some IDEs in you can set a breakpoint in decompiled code - that would help here. If you can do so, maybe you can use the "Evaluate expression" functionality of the IDE to run the code that fails in order to find the exception.

Anyway, I think it's likely that the exception is about some dependency. You can at least try the following things:

  • Clear bin and obj folders and then rebuild
  • Check if all binding redirects are correct - It's not unlikely that you reference a DLL of a certain version but maybe you have the wrong binding redirect or you're missing a binding redirect for that DLL
#294430
Jan 10, 2023 17:38
Vote:
 

Apparently you are seeing bug COM-12602, which was fixed in 13.28 (better handling of dynamic type loading). Please upgrade (best to 13.33)

#294482
Jan 11, 2023 11:35
SG
Vote:
 

Thanks, will check it out.

#294494
Jan 11, 2023 14:29
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.