Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello,

I have a problem when I deployed my ASP app on IIS. All pages not using WCF are running well. The site is also running well on the ASP.NET development server. But when a page is called which calls a WCF service, I got the following error:

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

C++
[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
   VesselDesign.Common.TypeHelpers.TypeHelper.GetChilderen(Type aType, Boolean IncludeGenericTypes) in C:\VesselDesign\Common\VesselDesign.Helpers\TypeHelper.cs:102
   VesselDesign.Common.TypeHelpers.TypeHelper.GetChilderen(Type aType) in C:\VesselDesign\Common\VesselDesign.Helpers\TypeHelper.cs:88
   VesselDesign.BusinessLayer.Objects.BusinessObject.GetKnownTypes() in C:\VesselDesign\VesselDesign.BusinessLayer.Objects\BusinessObject.cs:530



The class of the object has a KnowType attribute which has the GetKnownTypes method as a parameter. This method will dynamicly retrieves all descendends of this class and returns them. It uses reflection ( with a call to System.AppDomain.CurrentDomain.GetAssemblies() ) to retrieve the descendends. I think this is causing the problem and it possibly something with security, but what???


Can anyone please help me with this?



Thanks a lot!!!!



Marco
Posted
Updated 2-Jan-11 20:30pm
v4

1 solution

This really is one of Microsoft's finest error messages isn't it. :-)
I did a quick google for "Retrieve the LoaderExceptions property for more information", I suggest you do the same a quite a few people have the same error message, but with differing causes.
These range from different compilation target frameworks in release/debug to a referenced assembly being missing to just a plain old rebuild needed.

This[^] seemed to have quite a few answers to the various causes.

I'll 5 your question, hopefully someone else will have a better answer.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900