Server Error in '/FirstProject' Application. Unable

Posted by Community Admin on 04-Aug-2018 01:24

Server Error in '/FirstProject' Application. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

All Replies

Posted by Community Admin on 08-May-2011 00:00

Hi,


I just install sitefinity 4.1,created a new page then i tried to create a new custome controls and rebuild the project....
when i ran it it crashed with the following error message  below, what did i do wrong ?

Server Error in '/FirstProject' 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.]
   DynamicModule.ns.Wrapped_OpenAccessMetaDataProvider_0a3fbc0103574d67ac89c06b3a659b93.Initialize(String providerName, NameValueCollection config, Type managerType) +197
   Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager) +1479
   Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase`1 manager) +63
   Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName) +161
   Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName) +131
   BuildUp_Telerik.Sitefinity.Data.Metadata.MetadataManager(IBuilderContext ) +179
   Telerik.Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +12
   Telerik.Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +195
   Telerik.Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +190
   Telerik.Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +163

[ResolutionFailedException: Resolution of the dependency failed, type = "Telerik.Sitefinity.Data.Metadata.MetadataManager", name = "OpenAccessDataProvider".
Exception occurred while: Calling constructor Telerik.Sitefinity.Data.Metadata.MetadataManager(System.String providerName).
Exception is: ReflectionTypeLoadException - Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
-----------------------------------------------
At the time of the exception, the container was:

  Resolving Telerik.Sitefinity.Data.Metadata.MetadataManager,OpenAccessDataProvider
  Calling constructor Telerik.Sitefinity.Data.Metadata.MetadataManager(System.String providerName)
]
   DynamicModule.ns.Wrapped_OpenAccessUserActivityProvider_85e1b6191fa943d4820b3977cd89c648.Initialize(String providerName, NameValueCollection config, Type managerType) +195
   Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager) +1479
   Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase`1 manager) +63
   Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName) +161
   Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName) +131
   BuildUp_Telerik.Sitefinity.Security.UserActivityManager(IBuilderContext ) +179
   Telerik.Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) +12
   Telerik.Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +195
   Telerik.Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +190
   Telerik.Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +163

[ResolutionFailedException: Resolution of the dependency failed, type = "Telerik.Sitefinity.Security.UserActivityManager", name = "OpenAccessUserActivityProvider".
Exception occurred while: Calling constructor Telerik.Sitefinity.Security.UserActivityManager(System.String providerName).
Exception is: ResolutionFailedException - Resolution of the dependency failed, type = "Telerik.Sitefinity.Data.Metadata.MetadataManager", name = "OpenAccessDataProvider".
Exception occurred while: Calling constructor Telerik.Sitefinity.Data.Metadata.MetadataManager(System.String providerName).
Exception is: ReflectionTypeLoadException - Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
-----------------------------------------------
At the time of the exception, the container was:

  Resolving Telerik.Sitefinity.Data.Metadata.MetadataManager,OpenAccessDataProvider
  Calling constructor Telerik.Sitefinity.Data.Metadata.MetadataManager(System.String providerName)

-----------------------------------------------
At the time of the exception, the container was:

  Resolving Telerik.Sitefinity.Security.UserActivityManager,OpenAccessUserActivityProvider
  Calling constructor Telerik.Sitefinity.Security.UserActivityManager(System.String providerName)
]
   Telerik.Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +327
   Telerik.Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides) +15
   Telerik.Microsoft.Practices.Unity.UnityContainerExtensions.Resolve(IUnityContainer container, String name, ResolverOverride[] overrides) +82
   Telerik.Sitefinity.Abstractions.ObjectFactory.Resolve(String name) +74
   Telerik.Sitefinity.Data.ManagerBase`1.GetManager(String providerName, String transactionName) +255
   Telerik.Sitefinity.Security.SecurityManager.AuthenticateRequest(HttpContextBase context) +1043
   Telerik.Sitefinity.Web.SitefinityHttpModule.Context_AuthenticateRequest(Object sender, EventArgs e) +18
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +168
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +76


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Posted by Community Admin on 09-May-2011 00:00
Hello John,

Please check whether the project has all dlls in the bin folder and reference to them. This error might occur if you have rebuild the project which removes the dlls from the bin folder.

Regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Posted by Community Admin on 18-May-2011 00:00
Victor,

Is there going to be a solution for this or is this a thing that you guys can't resolve (maybe its a VS2010 problem?)
I've had this problem several times already and it's really annoying.


Rob
Posted by Community Admin on 18-May-2011 00:00
Hi Victor,

I am also facing the same problem when I add WCF service reference to SiteFinity Web Application. Project stops working and new project need to set up. I have raised a token for it. But still not got any satisfactory reply.

Can you please help?

Regards,
Swati Bhatia
Posted by Community Admin on 18-May-2011 00:00
Hi Rob,

There are specific cases when you get such error and they are not caused by the system itself, but if you mess up with the assemblies which need to be corresponding to the correct version of Sitefinity or if you upgrade and something breaks the process. For example if you click rebuild in the VS studio project VS will clean the libraries from the bin folder. Then the ones which are not referenced from Libraries, but from bin will be missing. You are getting the loader exceptions because the project is missing assemblies from the new modules.

Therefore if you have any that are missing you can get them from a clean installation of a new sitefinity project.

Regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Posted by Community Admin on 14-Jun-2011 00:00
Hi guys, I will necro this thread, as I have just experienced the same problem. I would dare to say that the installer fail to copy files to the bin folder under some circumstances.

The first installation worked fins out of the box and have 44 files in it's BIN (after build)
The Second installation get yellow screen and has 29 files in its BIN (after build)
The third installation had 42 files before and 44 after build.

So, what is missing in the Second installation.
Two dll's
-Facebook.dll
-Newtonsoft.Json.dll

All XML except
-Facebook.Web.xml

I can with absolute certainty say that I did not mess with the bin-folder or using the command "clean solution" at installation time. Just a rebuild have never cleaned anything in Bin for me in VS2010 SP1

Anyways, it's easy to get around the problems as you suggest, by just copying the template projects Bin folder. I think this problem might be worth a KB article.

/Magnus

Posted by Community Admin on 15-Jun-2011 00:00
Hi ,

You can always reference _EmptyProject\bin which is added the same folder where Sitefinity.exe resides so you can copy the dlls or make a reference to this bin.

All the best,
Ivan Dimitrov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Posted by Community Admin on 06-Mar-2012 00:00

Hello,

I was still working on sitefinity,I rebooted it so I got this error :

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.

I need a sooner solution please 
Posted by Community Admin on 06-Mar-2012 00:00
Please I need a solution for the bug
Posted by Community Admin on 09-Mar-2012 00:00
Hello,

The most possible cause for this problem is if you have rebuilt your project which cleans the /bin folder and rebuilds the projects to recreate their assemblies, however since the Telerik assemblies cannot be rebuilt, as we're distributing the compiled dlls you'll need to make sure that if you're rebuilding you're referencing the Telerik assemblies from a folder different from /bin in order not to get this problem.

If you open the References list of your solution in Visual Studio, you can match the references, which have a path pointing to the Bin folder of your solution, with the binaries that you've copied into your Bin folder.

What I usually do when developing in Visual Studio is that I copy all binaries in a folder named "/Dependencies" which stores all third-party binaries and my solution references point to that folder, so that when I rebuild the project Visual Studio will clean the bin folder, but it will copy all binaries frome the Dependencies folder.


Greetings,
Boyan Barnev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Posted by Community Admin on 09-Mar-2012 00:00
Hi Boyan
Thankx for help 
This thread is closed