November Happy Hour will be moved to Thursday December 5th.

Marthin Freij
Apr 30, 2010
  16510
(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
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog