Marthin Freij
Apr 30, 2010
  16376
(1 votes)

EPiServer - ReflectionTypeLoadException: Unable to load one or more of the requested types

Today I installed Page Type Builder 1.2 Beta 2 on my ongoing EPiServer CMS 6 project. I dropped the Page Type Builder assemblies in the bin folder, recreated the references, did an iisreset and then tried to start the site. I got the following exception:

Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present - inspect with debugger for complete view.
Check assemblies [PageTypeBuilder, Version=1.1.9.1, Culture=neutral, PublicKeyToken=6fb8762af0e6dbed] and/or types [PageTypeBuilder.Reflection.MethodInfoExtensions,
PageTypeBuilder.Abstractions.PageTypeFactory,
PageTypeBuilder.Activation.PageTypePropertyInterceptor,
PageTypeBuilder.Discovery.PageTypeDefinition,
PageTypeBuilder.Synchronization.PageTypePropertyUpdater,
PageTypeBuilder.Discovery.PageTypePropertyDefinitionLocator,
PageTypeBuilder.Initializer,
PageTypeBuilder.Synchronization.PageTypeUpdater,
PageTypeBuilder.PageTypeBuilderException,
PageTypeBuilder.UI.PageDataValidationExtensions,
PageTypeBuilder.Synchronization.Validation.UnmappablePropertyTypeException,
PageTypeBuilder.Discovery.PageTypeDefinitionLocator,
PageTypeBuilder.PageDataExtensionMethods,
PageTypeBuilder.Activation.PageTypePropertiesProxyGenerationHook,
PageTypeBuilder.Synchronization.TabDefinitionUpdater,
PageTypeBuilder.Reflection.AttributedTypesUtility,
PageTypeBuilder.Discovery.PageTypePropertyDefinition,
PageTypeBuilder.Synchronization.TabDefinitionExtensions,
PageTypeBuilder.Synchronization.PageTypeSynchronizer,
PageTypeBuilder.Synchronization.PageTypePropertyDefinitionExtensions]. Information from LoaderExceptions property [Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.,
Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.,
Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.,
Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.,
Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.].

The reason for this exception is Windows 7 security features. When you download assemblies from Internet they might be marked as unsafe. To solve this, right click each assembly, select Properties and click the Unblock button on the General tab.

Apr 30, 2010

Comments

Sep 21, 2010 10:33 AM

Downloading stuff off of the Internet is dangerous. Luckily the folks in Redmond are there to protect us.
/ Joel Abrahamsson

Sep 21, 2010 10:33 AM

I just got this error and solved it thanks to this posting. Thanks Marthin for sharing. The people in Redmond are dangerous! :-)

Arild Moland
Arild Moland Sep 21, 2010 10:33 AM

I was searching for something completely different, but stumbled upon this blog which actually resolves a very annoying error I've been struggling finding an answer to. Thanks!

Oct 31, 2010 09:50 PM

Got the same initial problem and after unblocking the downloaded dlls I now still got the same error message but now it complains at my dll for the templates especially the two types Global and MasterPage...!?

I'm clueless about this right now since that dll isn't downloaded!

Eric
Eric Nov 5, 2010 12:03 PM

This post really helped my today :) Awsome!!

Jonathan Sewell
Jonathan Sewell May 11, 2011 07:54 AM

I unblocked the files, but had to reboot too before the site would run.

Jan 5, 2012 04:20 PM

hi martin,

For me i didn't faced the problem of unblocking but still m getting the following error when using PageTypeBuilder 2.0.

The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) The export 'PageTypeBuilder.Initializer (ContractName="EPiServer.Framework.IInitializableModule")' is not assignable to type 'EPiServer.Framework.IInitializableModule'.

Resulting in: Cannot set import 'EPiServer.Framework.Initialization.InitializationEngine.Modules (ContractName="EPiServer.Framework.IInitializableModule")' on part 'EPiServer.Framework.Initialization.InitializationEngine'.
Element: EPiServer.Framework.Initialization.InitializationEngine.Modules (ContractName="EPiServer.Framework.IInitializableModule") --> EPiServer.Framework.Initialization.InitializationEngine

Can u assist me in this or any help appreciated.

Thanks,
MD

Tobias Jakobsson
Tobias Jakobsson May 3, 2012 10:46 AM

MD - Did you solve your problem? We are having a similar problem right now.

marcus.jorad@sublime.se
marcus.jorad@sublime.se May 6, 2013 01:56 PM

Helped me, thanks!

dinnu007
dinnu007 Mar 10, 2014 03:08 PM

I too facing the similar problem.... i unblocked in the general tab of each and every dll but still iam facing the problem.... please help me out....below is my problem

Server Error in '/' Application.
Unable to load one or more of the requested types. The following information may be a subset of the Type/LoaderException information present - inspect with debugger for complete view.
Check assemblies [EPiServer.ContentChannelService, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8fe83dea738b45b7] and/or types [EPiServer.BaseLibrary.IContentChannelHandler,
EPiServer.ContentChannels.ContentChannelHandlerBase,
EPiServer.ContentChannels.ContentChannelHandler,
EPiServer.ContentChannels.Events.ChannelEventArgs,
EPiServer.ContentChannels.Events.ChannelPreActionEvent,
EPiServer.ContentChannels.Events.FileMetaDataImportingEventArgs,
EPiServer.ContentChannels.Events.PageDeletingEventArgs,
EPiServer.ContentChannels.Events.PageDeletedEventArgs,
EPiServer.ContentChannels.Events.FileEventArgs,
EPiServer.ContentChannels.Events.FileDeletingEventArgs,
EPiServer.ContentChannels.Events.PageFileImportingEventArgs,
EPiServer.ContentChannels.Events.PageImportedEventArgs,
EPiServer.ContentChannels.Events.FileImportingEventArgs,
EPiServer.ContentChannels.Events.PageImportingEventArgs,
EPiServer.ContentChannels.ListWrapper,
EPiServer.ContentChannels.ContentChannel+PropertyMap,
EPiServer.ContentChannels.ContentChannelAdministration,
EPiServer.ContentChannels.ObjectStoreContentChannelAdministration,
EPiServer.WebServices.ContentChannelService,
{A1675BE9-2FF7-4E6A-A90A-91AABEB448E8}]. Information from LoaderExceptions property [Could not load file or assembly 'EPiServer.BaseLibrary, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040),
Could not load file or assembly 'EPiServer.UI, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040),
Could not load file or assembly 'EPiServer.UI, Version=5.1.422.122, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)].

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024