Thanks to visit codestin.com
Credit goes to github.com

Skip to content

"Unable to load one or more of the requested types" server error after JavaScriptEngineSwitcher upgrade to 2.4.0 #417

Closed
@roman-yagodin

Description

@roman-yagodin

Error message:

Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Stack trace:

[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() +118
   System.Linq.<SelectManyIterator>d__16`2.MoveNext() +293
   System.Linq.WhereEnumerableIterator`1.MoveNext() +108
   React.Initializer.InitializeIoC(Func`2 requestLifetimeRegistration) +409
   React.Web.WebInitializer.Initialize() +71

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +260
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146
   WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +102
   WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +718
   WebActivatorEx.ActivationManager.Run() +125

[InvalidOperationException: Метод инициализации перед запуском приложения (Run) в типе WebActivatorEx.ActivationManager вызвал исключение со следующим сообщением об ошибке: Exception has been thrown by the target of an invocation..]
   System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +874
   System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +169
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +166
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +176
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +882

[HttpException (0x80004005): Метод инициализации перед запуском приложения (Run) в типе WebActivatorEx.ActivationManager вызвал исключение со следующим сообщением об ошибке: Exception has been thrown by the target of an invocation..]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712

React.Core 3.0.1 and React.Web 3.0.1 installed from NuGet.

Upgraded packages:

JavaScriptEngineSwitcher.Core 2.4.0
JavaScriptEngineSwitcher.Jint 2.4.0
JavaScriptEngineSwitcher.Msie 2.4.0
JavaScriptEngineSwitcher.Jurassic 2.4.2
JavaScriptEngineSwitcher.V8 2.4.2
JavaScriptEngineSwitcher.ChakraCore 2.4.6
MsieJavaScriptEngine 2.2.1

All upgraded assemblies copied into website bin folder.

Only Jurassic and Jint registered, both worked fine before JavaScriptSwitcher upgrade:

var engineSwither = JsEngineSwitcher.Instance;
engineSwither.EngineFactories.AddJurassic ();
engineSwither.EngineFactories.AddJint ();
engineSwither.DefaultEngineName = JurassicJsEngine.EngineName;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions