SaaS CMS has officially launched! Learn more now.

Initialize action failed for EPiServer.Framework.IInitializableModule.Initialize on class Foundation.Find.Cms.Initialize, Foundation.Find.Cms


I am very new to Episerver. Went through the readme in

Installation went through fine. I can compile the solution without any error. I tried to load http://yourdomainname/setup

page and I am getting the following error.

Initialize action failed for EPiServer.Framework.IInitializableModule.Initialize on class Foundation.Find.Cms.Initialize, Foundation.Find.Cms

After debugging I found that initialization is failing to load types from Microsoft.IdentityModel.Clients.ActiveDirectory

Any help will be appreciated. Thanks.

Jun 15, 2020 16:23

I suppose you are using a fairly old version of Find. upgrading to at least 13.2.6 should get rid of that, and you get other improvements as well

Jun 15, 2020 17:20

The version of Find in the project is 13.2.7.

Jun 15, 2020 17:38

Is there any error you faced while installation?

Jun 16, 2020 10:32
Himadri - Jun 16, 2020 12:36
There was no error in installation. Solution compiles fine and all nuget packages restored. Databases are there, websites are there in IIS. Host file has entries. Is there any way to disable Find? I can then try to see if rest of the site is loading or not.
Ravindra S. Rathore - Jun 16, 2020 12:42
You can.
Ravindra S. Rathore - Jun 16, 2020 12:43
or I think you can uninstall the find NuGet package
Himadri - Jun 16, 2020 12:44
Thanks. I will give that a try.
Himadri - Jun 16, 2020 15:59
Disabling find doesn't work as mentioned in the article. The issue is happening when application is bootstrapping.

I was mistaken with another issue - can you post the full stacktrace here?

Jun 16, 2020 11:55
Himadri - Jun 16, 2020 12:39
Here is the stack trace from SiteErrors.log. This doesn't show which dll is failing to load. I can see that only when I debug in visual studio and look at the LoaderExceptions property

2020-06-15 15:36:25,825 [1] ERROR EPiServer.Framework.Initialization.InitializationEngine: Initialize action failed for 'EPiServer.Framework.IInitializableModule.Initialize on class Foundation.Find.Cms.Initialize, Foundation.Find.Cms, Version=, Culture=neutral, PublicKeyToken=null'
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at System.Linq.Enumerable.

I could bring up the site by commenting code in void IInitializableModule.Initialize(InitializationEngine context) in Initialize class ofFoundation.Find.Cms

Something will break later. Search is working though. 

Jun 16, 2020 16:49

I get the same error in the current main branch of Foundation

ArgumentException: Unable to find a module by assembly 'EPiServer.Forms, Version=, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' (Parameter 'moduleAssembly')
EPiServer.Shell.Paths.ToResource(Assembly moduleAssembly, string moduleRelativeResourcePath)
EPiServer.Shell.Paths.ToResource(Type typeInModuleAssembly, string moduleRelativeResourcePath)
System.RuntimeMethodHandle.InvokeMethod(object target, ref Span<object> arguments, Signature sig, bool constructor, bool wrapExceptions)
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
Microsoft.Extensions.DependencyInjection.ActivatorUtilities+ConstructorMatcher.CreateInstance(IServiceProvider provider)
Microsoft.Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, object[] parameters)
EPiServer.Forms.Helpers.Internal.FormsExtensions.GetPropertyValue(Type type, string propertyName)
EPiServer.Forms.EditView.InitializationModule+<>c.<GetSubmissionActorTypes>b__31_0(Type t)
System.Linq.Enumerable+WhereArrayIterator<TSource>.GetCount(bool onlyIfCheap)
System.Linq.OrderedEnumerable<TElement>.GetCount(bool onlyIfCheap)
System.Linq.Enumerable.Count<TSource>(IEnumerable<TSource> source)
EPiServer.Forms.EditView.InitializationModule.Initialize(InitializationEngine context)
EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, string key)
EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context)
Aug 03, 2022 10:26

@Jørgen - your problem is completely different. 

EPiServer.Forms, Version=, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' (Parameter 'moduleAssembly')

this relates to Forms, not Find. 

Aug 03, 2022 10:55
* 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.