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.
Downloading stuff off of the Internet is dangerous. Luckily the folks in Redmond are there to protect us.
/ Joel Abrahamsson
I just got this error and solved it thanks to this posting. Thanks Marthin for sharing. The people in Redmond are dangerous! :-)
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!
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!
This post really helped my today :) Awsome!!
I unblocked the files, but had to reboot too before the site would run.
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
MD - Did you solve your problem? We are having a similar problem right now.
Helped me, thanks!
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
{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),
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,
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)].