SaaS CMS has officially launched! Learn more now.

Marthin Freij
Apr 30, 2010
  16370
(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
Creating Custom Actors for Optimizely Forms

Optimizely Forms is a powerful tool for creating web forms for various purposes such as registrations, job applications, surveys, etc. By default,...

Nahid | Jul 16, 2024

Optimizely SaaS CMS Concepts and Terminologies

Whether you're a new user of Optimizely CMS or a veteran who have been through the evolution of it, the SaaS CMS is bringing some new concepts and...

Patrick Lam | Jul 15, 2024

How to have a link plugin with extra link id attribute in TinyMce

Introduce Optimizely CMS Editing is using TinyMce for editing rich-text content. We need to use this control a lot in CMS site for kind of WYSWYG...

Binh Nguyen Thi | Jul 13, 2024

Create your first demo site with Optimizely SaaS/Visual Builder

Hello everyone, We are very excited about the launch of our SaaS CMS and the new Visual Builder that comes with it. Since it is the first time you'...

Patrick Lam | Jul 11, 2024

Integrate a CMP workflow step with CMS

As you might know Optimizely has an integration where you can create and edit pages in the CMS directly from the CMP. One of the benefits of this i...

Marcus Hoffmann | Jul 10, 2024

GetNextSegment with empty Remaining causing fuzzes

Optimizely CMS offers you to create partial routers. This concept allows you display content differently depending on the routed content in the URL...

David Drouin-Prince | Jul 8, 2024 | Syndicated blog