Unable to load one or more of the requested types

Topics: Developer Forum, Project Management Forum
Mar 7, 2009 at 3:54 AM
Hello All,

I am getting the following error while integrating the n2CMS in my existing web site.

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

Exception Details: System.Reflection.ReflectionTypeLoa
dException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Stack Trace:


[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.]
System.Reflection.Module.GetTypesInternal(StackCrawlMark& stackMark) +0
System.Reflection.Assembly.GetTypes() +86
N2.Engine.AppDomainTypeFinder.Find(Type requestedType) +177

[N2Exception: Error getting types from assembly Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4, Could not load file or assembly 'Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified., Could not load file or assembly 'Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified., Could not load file or assembly 'Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified., Could not load file or assembly 'Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified.]
N2.Engine.AppDomainTypeFinder.Find(Type requestedType) +474
N2.Plugin.<GetPluginDefinitions>d__0.MoveNext() +454
N2.Plugin.PluginBootstrapper.InitializePlugins(IEngine engine, IEnumerable`1 plugins) +191
N2.Engine.ContentEngine.Initialize() +87
N2.Context.Initialize(Boolean forceRecreate) +76
N2.Context.get_Current() +32
N2.Edit.Web.EditPage.get_Engine() +24
N2.Edit.Web.EditPage.get_SelectedItem() +63
N2.Edit.Default.OnInit(EventArgs e) +108
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692
Coordinator
Mar 7, 2009 at 11:03 AM
If you can work with the version from the trunk I've added telerik to the assemblies to ignore.
Sep 28, 2009 at 7:18 PM

Hi. Im also trying to integrate N2CMS with my existing website. I'm getting an error with my 3rd party GMaps assembly.

Is there anyway getting around it?

Thanks!

 

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.]
System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) +0
System.Reflection.Assembly.GetTypes() +111
N2.Engine.AppDomainTypeFinder.Find(Type requestedType) +111

[N2Exception: Error getting types from assembly GMaps, Version=3.2.0.1, Culture=neutral, PublicKeyToken=f43a93ab972291b8, 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., 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.]
N2.Engine.AppDomainTypeFinder.Find(Type requestedType) +376
N2.Plugin.PluginBootstrapper.GetPluginDefinitions() +343
N2.Engine.ContentEngine.Initialize() +55
N2.Context.Initialize(Boolean forceRecreate) +63
N2.Web.InitializerModule.Init(HttpApplication context) +41
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +406
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +188
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +295
System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +56
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +231

[HttpException (0x80004005): Error getting types from assembly GMaps, Version=3.2.0.1, Culture=neutral, PublicKeyToken=f43a93ab972291b8, 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., 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.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8897659
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +333
Coordinator
Sep 30, 2009 at 9:34 PM

You can configure n2 not to analyze the contents of the bin folder, instead you need to configure the assemblies to analyze explicitly:

<n2>
    <engine dynamicDiscovery="false">
       <assemblies>
          <add assembly="N2"/>
          <add assembly="N2.Security"/>
          <add assembly="N2.Edit"/>
          
<add assembly="N2.Templates"/>
          
<add assembly="AnyOtherAssembliesWithN2Stuff"/>

Dec 3, 2009 at 12:09 AM

Well, I'm having this issue and can't figure out a way out. 

I've uploaded my n2 site to my hosting environment and it's looking for some assemblies in the mysql.visualstudio.dll that it simply can't find. I tried to put this <n2> tag and configure it to load the assemblies manually but I guess I'm doing it wrong. 

Help? 

My page is at http://www.acciolydesenvolvimento.com.br/marcaambiental/edit

Dec 18, 2009 at 12:47 PM
Edited Dec 18, 2009 at 12:52 PM

mods plz delete this post :(

Dec 18, 2009 at 4:49 PM
You're probably missing the required DLLs in the bin folder.

Maybe you're running in a middle-trust environment? There are some special configurations and tweaks needed to make N2 work in a server without full-trust enabled. You can reference it here.

Sorry I'm not an N2 expert. I had some trouble making it work around here too.

Cheers,

--
marcos accioly
 designer . developer
 27 8129 8020



2009/12/18 minah <notifications@codeplex.com>

From: minah

hi

Iam trying to integrate this to my existing web site refering here . I am stuck at the third step "Changes to website", My website is throwing the following error. Please help

 

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section castle.

Source Error:

Line 111:      providerName="System.Data.SqlClient" />
Line 112: </connectionStrings>
Line 113: <castle>
Line 114: <!-- Required properties -->
Line 115: <properties>


Source File: D:\_WorkArea\Huzu\_dev\Calendar\HuzuWeb\trunk\src\HuzuWeb\web.config    Line: 113


Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3601

Read the full discussion online.

To add a post to this discussion, reply to this email (n2cms@discussions.codeplex.com)

To start a new discussion for this project, email n2cms@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com