Search code examples
sitefinity-4

Sitefinity 4.2 - Unable to load one or more of the requested types


I am trying to pull up a Sitefinity 4.2 project and get this error when doing so.

Server Error in '/kadytv' Application.

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

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.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

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:

[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.] DynamicModule.ns.Wrapped_OpenAccessMetaDataProvider_aec2ba29742646bdae02fcb21a4945ef.Initialize(String providerName, NameValueCollection config, Type managerType) +405 Telerik.Sitefinity.Data.ManagerBase1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase1 manager) +2005 Telerik.Sitefinity.Data.ManagerBase1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase1 manager) +74 Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName) +510

[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) +117 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +247 System.Activator.CreateInstance() +88 Telerik.Sitefinity.Data.ManagerBase`1.GetManager(String providerName, String transactionName) +123 Telerik.Sitefinity.Services.SystemManager.Initialize() +232 Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes(RouteCollection routes) +293 Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +386 Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +114 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +575 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +352 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11642112 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4865877

I tested the 4.2 install with an empty project and all works ok but this custom 4.2 project is not happy for some reason.

Anyone else have experience with this and able to resolve it.


Solution

  • You might find this forum thread on Microsoft Connect useful.

    I have a feeling that your problem is related to the entity Framework DLL's; so try setting your Local Copy to true.

    If you can't find how to do this, edit your csproj file and find <Private>False</Private> line and set to true.