New Posts New Posts RSS Feed: Unable to load one or more of the requested types
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Unable to load one or more of the requested types

 Post Reply Post Reply
Author
danjal View Drop Down
Groupie
Groupie


Joined: 20-Sep-2010
Posts: 43
Post Options Post Options   Quote danjal Quote  Post ReplyReply Direct Link To This Post Topic: Unable to load one or more of the requested types
    Posted: 24-Nov-2010 at 4:45am

Thank you kimj

 

I added all of Ideablade assemblies and made sure that CopyLocal for all was set to true.

·         IdeaBlade.Core

·         IdeaBlade.EntityModel

·         IdeaBlade.EntityModel.Edm

·         IdeaBlade.EntityModel.Edm.Metadata

·         IdeaBlade.EntityModel.Server

·         IdeaBlade.EntityModel.Web

·         IdeaBlade.Linq

·         IdeaBlade.Validation

·         IdeaBlade.VisualStudio.DTE

 

And it worked!

 

There was no debug log to look at.

 

We use MVVM and Prism, with lots of modules and custom controls. So I did not know where to look for a missing assembly. And as I say, it works fine running/debugging on our development machines.

Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 22-Nov-2010 at 5:36pm
Sorry for the frustration, danjal, we thought we'd fixed problems with exceptions during MEF initialization but it looks like we didn't.  One of your assemblies can't be opened and reflected against - the debug log should contain more information on which assembly and why.  But assuming that you really don't need to probe that assembly anyway - probing is to find your model and any custom interface implementations - you can easily work around the problem by specifying the assemblies you do want probed (we haven't yet added the ability to exclude assemblies).  So something like this in your global.asax should fix the problem:
 
using IdeaBlade.Core.Composition;
 
CompositionHost.SearchPatterns.Clear();
CompositionHost.SearchPatterns.Add("DomainModel.dll");  //  Add whatever assemblies you need probed
 
Also make sure that all necessary IdeaBlade assemblies are present in the bin folder:
IdeaBlade.Core
IdeaBlade.EntityModel
IdeaBlade.EntityModel.Edm
IdeaBlade.EntityModel.Server
IdeaBlade.EntityModel.Web
IdeaBlade.Linq
IdeaBlade.Validation


Edited by kimj - 22-Nov-2010 at 5:39pm
Back to Top
danjal View Drop Down
Groupie
Groupie


Joined: 20-Sep-2010
Posts: 43
Post Options Post Options   Quote danjal Quote  Post ReplyReply Direct Link To This Post Posted: 22-Nov-2010 at 7:21am

We are using DevForce 2010 v6.0.6.0.

We are trying to deploy our application on to our webserver. We have been following his documentation:

http://drc.ideablade.com/xwiki/bin/view/Documentation/Deployment#HDeployingaDevForceSilverlightApplication

 

Our application works fine when we run/debug on our development machines, but running the application from the server does not work.

When navigating to EntityService.svc we get this error:

Server Error in '/Silver2010' Application.


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.RuntimeModule.GetTypes(RuntimeModule module) +0

   System.Reflection.RuntimeModule.GetTypes() +4

   System.Reflection.Assembly.GetTypes() +78

   System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog() +113

   System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_Parts() +7

   IdeaBlade.Core.Composition.DefaultsCatalog.LoadCatalog() +207

   IdeaBlade.Core.Composition.CompositionHost..ctor() +39

   IdeaBlade.Core.Composition.CompositionHost.get_Instance() +90

   IdeaBlade.EntityModel.Server.EntityServiceHost.get_ServiceHostEventHandler() +20

   IdeaBlade.EntityModel.Server.EntityServiceHost.OnCreated() +13

   IdeaBlade.EntityModel.Server.EntityServiceHostFactory.CreateHostCore(Type serviceType, Uri[] baseAddresses) +40

   IdeaBlade.EntityModel.Server.EntityServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +40

   System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +420

   System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1440

   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +44

   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +615

 

[ServiceActivationException: The service '/Silver2010/EntityService.svc' cannot be activated due to an exception during compilation.  The exception message is: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..]

   System.Runtime.AsyncResult.End(IAsyncResult result) +679246

   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +190

   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +234

   System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +355

   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

 

 

 

This error looks a lot like the one in this post:

http://www.ideablade.com/forum/forum_posts.asp?TID=1876&title=unable-to-connect-to-entityservice

 

But we do not use ActiveReports.

Can anyone help? This is very frustrating.

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down