Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Hi all,
I anyone else getting this error.
Roberto,
I ran into that as well in my upgrade. I had to delete my VirtualPathSettingsConfig.config file in App_Code, which I came to after reading some posts about custom module problems in 4.1. Deleting that file made the error vanish.
Do I need that file? I have no idea :) I suppose I'll see what happens when I can make my custom modules compile and test them in 4.1 as well.
- William
Sorry, spoke too soon. This now happens to me randomly, hosing the entire site and requiring an IIS restart to fix.
Adding that to my long 4.1 upgrade problems list.
- William
Roberto,
Upon completely deleting the custom module I'd created from my project, this error went away. Haven't seen it in hours.
I'm hoping that when I get a 4.1 custom module working, that error won't return. But wanted to share with you how I fixed it in case that helps point you in a direction.
- William
Hi William,
Thanks for the response. This is a strange one as it is not consisten, even without my custom module if i change code in a user control that resides in my website project i get this error aswell, it is becoming very annoying, along with the other issues i am facing, dont know what i have done but no one at telerik seems to want to answer any of my questions.
Rob
it's because the product is broken and there are no answers yet. until they can actually release something usable we are all just wasting time playing with broken parts.
we fixed this problem by draggin in the dll from the new emptyfolder bin to our custom widget solution. then rebuilt it with the new references to the latest build dlls. then copied that in the bin folder for the sitefinitywebapp. problem wasnt resolved until we then rebuilt sitefinitywebapp - then went to emptyproject folder bin and copied all dlls from there in the bin folder in sitefinitywebapp. rebuilt once more and i havent seen this error since.
we built a custom slider/rotator widget with ability to select category names for filtering news items into the various sliders/rotators. i have 3 of them on our home page and they all work again just as before. seems a bit random that you've seemingly already done what i've described and your problem comes back each time. just make sure you really are using the references to the latest build they provided in the emptyproject/bin folder and good luck!
I just got this error after a *brand new install* from 4.1.
"Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."
<shakes head>
I am still getting this, everytime i make a change to a widget in my project, even if i am just changing some HTML, as soon as refresh,bang so have just accepted at the moment to get my project done i have to do a lot of copying of DLLs :)
Hello,
I also have this error even by changing all the dlls.
This issue is blocking us in the upgrade process.
Regards,
Julien
Update,
This issue for me is reoccurring as well, but randomly and oddly.
For instance, if I rebuild my entire application in VS2010 and hit refresh, SOMETIMES I'll get this error. However, if I then simply rebuild the application again (without copying any DLLs or updating references, just a rebuild) and then hit refresh, all is well.
Luckily in my case, I can just kick off a rebuild and I'm fine until the next rebuild (maybe)
Does Telerik have any response to this thread? Is this a known issue?
- William
Even more of an update.
I can easily reproduce this:
1. Rebuild the project
2. Refresh Dashboard Page (or any page)
- Result : Error above
3. Rebuild the project again
4. Refresh Dashboard Page
- Result: Fine
Rinse and repeat. So it does it every other time like clockwork.
Does not happen if I just build my main project, only happens when my rebuild includes my custom controls project, which it sounds like is the case with you as well. The odd thing is that a second rebuild of all fixes it.
Anyway, just wanted to share more info.
- William
One last update.
The oddness continues. Based on my last update, I tried a test where I rebuilt twice. In other words, I did a solution rebuild and then immediately afterwards, without refreshing, I did a second one. Upon refresh, I did not run into the problem.
So:
Case 1:
- Rebuild Solution
- Refresh
= Error
Case 2:
- Rebuild Solution
- Rebuild Solution Again
- Refresh
= No Error
What's even stranger. If I rebuilt THREE Times, I get the error. Four? No error.
- William
We are having same issue as everyone else.
@All in this thread
This hasn't worked for everyone, but it seems that copying the contentes from your installations _EmptyProject folder. Note, that if you have newer versions of the Telerik Controls or OpenAccess ORM in the BIN, you need to refresh those to the version you are using.
I was having this issue randomly, annoyingly, unreasonably, often, but doing this seemed to rectify it. Unfortunately, it's not the only issue with 4.1
Thanks, Greg
I also started having this issue.
Opened my project this morning, modified a custom control\widget and then the error.
After reading these posts I checked my bin directory and found that several dll were missing and most of the xml files.
(facebook.dll and newtonsoft.json.dll to be exact)
From a new project I copied all the dll and xml files over from the bin and my project started working again.
I have no idea how the files could have gone missing. Hopefully this info will help others out.
Hello guys,
I am wondering if this has something to do with a Source control or upgrade issue, in case your project was running during the upgrade, and some of the assemblies are not copied?
Regards,
Georgi
the Telerik team
In our case it was a fresh 4.1 setup, there was no upgrade involved.
Georgi,
My project was not running at the time of upgrade... I took a backup of the project from the production box and execute the upgrade against the backup...
When I tried to run the project after upgrade, I got bunch of errors relating to the New Letter Module... Ivan gave me a script to delete all news letters from the database. After I did that, when I run my project again, I get this error..
Screenshot attached.... If you'd like, I can send you my Zip file. Maybe you can take a look at it...
Georgi,
I do run under Source Control (TFS), however the BIN folder is not included (and would like to keep it that way!). This problem does, however, continue to occur even with all files checked out.
I've had to keep a copy of the bin folder for copying because of this issue. It seems to occur most if I do a REBUILD. If I only do a build the issue tends to not occur. I haven't had a chance yet to see if there is anything hinky in the project file itself that could be contributing to the problem.
Thanks, Greg
Hello ,
Could you check the log folder - App_Data/Sitefinity/Logs and see if there is a record generated at the time when this error occurs. There must be some more details about the error in the log file. Can you check that the dlls are not removed from your bin folder. If you make application restart does the problem persist?
Greetings,
Ivan Dimitrov
the Telerik team
Check this thread for reference: http://www.sitefinity.com/devnet/forums/sitefinity-4-x/bugs-issues/system-reflection-reflectiontypeloadexception.aspx
I just upgraded to Sitefinity v. 4.1 SP3 and am still encountering this error message.
You can view it for yourself here:
http://troytennis.troytennisacademy.com/
I have tried everything in this post that I can think of to try and resolve this issue. It works just fine when I deploy it to my local machine. I even had a friend deploy it to another hosting provider and the same deployment files seems to work there as well.
It is only when I deploy it to my Hosting Provider (WinHost), that I encounter this error. I was able to deploy Sitefinity v. 3.7 SP4 without any issues whatsoever.
Please advise.
Hi,
I encountered this problem a few times; they were all caused by a presence of a module in the solution. Currently, below strategy works for me.
1- repeat below sub-steps for each module project in your solution
step 1-a: delete all references in the project
step 1-b: clear the project
step 1-c: add below references to the project
(they are all under c:\users\your username\appData\local\telerik.sitefinity.sdk\dependencies\ )
Telerik.OpenAccess.dll
Telerik.OpenAccess.35.extensions.dll
Telerik.Sitefinity.dll
Telerik.Sitefinity.Model.dll
Telerik.Sitefinity.Resources.dll
Telerik.Sitefinity.Utilities.dll
Telerik.Web.UI.dll
2- clean all
3- rebuild all
4- run the web site --> success
I hope this helps,
Cihan
Hello,
"3- rebuild all" will clean the bin folder, so make sure that you have all dlls back in it after you perform the steps above.
Kind regards,
Ivan Dimitrov
the Telerik team
I took a complete copy of the solution and deployed them to 2 different hosting providers:
I deployed one to WinHost
I deployed one to Arvixe
The one on WinHost is displaying the error described above.
The one I deployed on Arvixe only started working after I renamed the entire dbo schema to my SQL Server user schema.
If it is not loading/rendering on one hosting provider, but working on another, is it possibly some IIS configuration or database configuration that could be causing this error message? I am getting absolutely nothing rendered in the logs under the App_Data directory, so that is the best error information I have at this moment.
Please advise.
Hello Samir,
The issue looks like related to the infrastructure, since the same website works on two servers, but fails on the third. The host should have IIS log and database log that would have more information.
Kind regards,
Ivan Dimitrov
the Telerik team
I had to set the <trust level="Full"> in my Web.config to get the error message to go away on my hosting provider.
@Rein,
Thanks Rein that solved my problem.Thanks a lot.
(I got this isue while installing custom module "Testimonials").
Once again Thanks
@Rein - You are the man!
Hi
For what it is worth this has driven me scatty for weeks
Eventually have found that after attaching a module project to a new 4.1 site and compiling dll in sites bin go missing.
Replacing and recompiling worked for me, setting config not to rebuild site seemed to stop it.
Ivan what is this about?
Best wishes
Charles
Hello Cranaboldo,
The dll`s will be missing when you rebuild or clean the solution, use Build instead to avoid their deletion. This is a problem related to Sitefinity 4.1. Also there may be other factors that cause it for a specific scenario. The solution is to carefully examine bin folder and references so that it is sure no files are missing.
Regards,
Stanislav Velikov
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I recently ran into this error after copying some files into my \bin folder and then trying to compile. Some specifics about my case:
- I had custom module projects that were not compiling due to the error.
- I had copied the files into the folder through windows explorer, not Visual Studio.
I found that refreshing my bin folder in Visual Studio resolved the issue.
Well, I thought I got by the issue. Turns out I lied and am now getting the error when compiling again. This all started for me when I added the Sitefinity 4.2 Hotfix dll's to my project. It really was as simple as replacing 4 Sitefinity dll's.
Questions that run through my mind:
- Why is simply replacing those 4 DLL's causing problems?
- Why do my custom module projects not compile but my other projects do? Is this an Open Access issue? I have other projects that reference the Open Access binaries, though they are not using it.
- Might my custom module projects be trying to compile with caches dll's that I cannot track down? I ran Process Monitor to observe file system activity for files named Telerik.Sitefinity.Utilities.dll while building. The only place I see such a file being accessed is in the website project bin folder.
- Any idea on how I can "check the Retrieve the LoaderExceptions property" when I am compiling? My web searches are not giving me the answer.
Any help would be greatly appreciated. This is so hard to diagnose.
Thanks,
Antoine
Hello Antoine,
The issue with Unable to load one or more of the requested types dates back to Sitefinity 4.1.1339. With version after 4.1.1574 I was unable to reproduce it at my end. This was caused by missing assemblies. All assemblies were shown as referenced, but in the bin folder the physical files was deleted and it had to be manually added.
If you can send me a problematic project I can review it at my end and tell you which assembly is missing.
Greetings,
Stanislav Velikov
the Telerik team
I have the same problem. I have a radgrid and entitydatasource. First I removed entitydatasource and placed again. It seems fine but I dont understand whats happened.
Thanks,
Levent
Hi Levent,
Can you give me some additional information regarding the steps you took to get "Unable to load one or more of the requested types" error. Just adding additional functionality to a widget should not lead to this error. Have you cleaned or Rebuilt the Visual Studio solution before getting the error?
Following the previous posts you can see there are some suggestions to resolve the issue, have you tried them out? What was the result?
Greetings,
Stanislav Velikov
the Telerik team
I encountered this issue after upgrading from Sitefinity 4.1 SP2 to Sitefinity 4.2. I compared the bin folder my upgraded project to one that was created through Sitefinity 4.2 directly and noticed a huge disparity between the dll's that are in the bin folders. Should I make them uniform? If so, which should be my basis?
Hello Jkregala,
There are difference in the number of assemblies used in Sitefinity 4.1 and 4.2. For example OpenAccess.AdoNet is no longer used and there are new analytics assemblies and migration module assembly.
If want to use Sitefinity 4.1 refer to working 4.1 projects.
If your project is using Sitefinity 4.2 refer to Sitefiniy 4.2 projects because of the difference in assemblies.(Sitefinity 4.1 will still search for OpenAccess.AdoNet.dll)
All the best,
Stanislav Velikov
the Telerik team
Hi Stanislav,
I just made sure that the DLL's in my upgraded project are equal to the DLL's present in the bin folder of _EmptyProject in the installation directory for Sitefinity 4.2. It seems to work fine.
Is this a safe practice?
Thanks.
After tried many solutions I think I solved the problem but is not about sitefinity 4.2
Its all about missing dll's. If I am not wrong no one gets "compile error" or missing dll messages.
Common problem is "entity framework" references.
You should set : Use Local Copy = True for project references.
If you cant find these setting on your project open your project folder and edit your csproj file.
You should see tags and correct False to True <Private>False</Private> ( for entity framework lines.)
How to use Local Copy = True
http://msdn.microsoft.com/en-us/library/t1zz5y8c.aspx
Should read these
http://connect.microsoft.com/VisualStudio/feedback/details/541962/unable-to-load-one-or-more-of-the-requested-types-connected-with-entitydatasource
I did not try that but may be useful. someone tried and got the solution.
http://brianseekford.com/index.php/2011/08/01/unable-to-load-one-or-more-of-the-requested-types-when-using-entitydatasource-with-entity-framework-in-asp-net/
http://www.telerik.com/community/forums/aspnet-ajax/grid/what-is-an-alternative-for-entitydatasource.aspx
If works or not please post it here.
Hope this help...
Levent
Hi
@ Jan
Yes this is a safe practice because when you create a new project with the project manager the bins that are added to it are coming from this _Empty project.
@Levent
The info you have linked to is correct, but in the case when using EntityFramework and Sitefinity uses OpenAccess as an ORM tool. The solution described by Jan is an easier and will get your project up and running.
Greetings,
Stanislav Velikov
the Telerik team
@Levent
I want to thank you, Levent, your links help me to solve this annoying issue.
Just by setting the ContextTypeName property in the EntityDataSource, the error was gone!
<asp:EntityDataSource ID="EventosDS" runat="server"
ConnectionString="name=StMartinEntities"
DefaultContainerName="StMartinEntities" EnableDelete="True"
EnableFlattening="False" EntitySetName="Eventos"
ContextTypeName="SitefinityWebApp.Data.StMartinEntities">
</asp:EntityDataSource>
my issue was the typical exception page:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
now with the "ContextTypeName="SitefinityWebApp.Data.StMartinEntities" property all is working fine :D
Thanks you very much!
-Mario-
All,
I spent about half an hour with this issue this morning (Sitefinity v4.3) and happen to come across this thread, so I thought I'd share my solution.
"Could not load type" and related errors nearly always arise due to a missing DLL. In my case, that was caused by using "Clean Solution" from within Visual Studio, but it can also happen when deploying a project to another server.
An easy fix for this is to make sure that *all* of the DLLs in your BIN folder are added as a reference to your VS project. Some of the DLLs that Sitefinity seems to require aren't explicitly referenced in the default project, probably because they're required by other DLLs but not by the project itself.
However, if you explicitly add references to those DLLs, they won't be deleted from the bin folder when cleaning the solution, and they should be copied along with everything else when deploying the site.
Hope this helps someone!
Hello David,
Thank you for sharing your experience. This is exactly the case. When you perform clean or Rebuild Visual Studio actually removes all references from bin folder and tries to reference them again. If they are referenced from another project re-referencing them might not be possible and thus they are not added again. This produces an error message.
Greetings,
Stanislav Velikov
the Telerik team
Adding the ContextTypeName attribute to my EntityDataSource also resolved my problem!
The format that was required was the following:
ContextTypeName="<namespace of DLL>.<Entity Set Name>"
Therefore, in my case, it was ContextTypeName="TTAEntities.TroyAcademyEntities"
Thanks again!
I came across a similiar kinda issue and this happened when I rebuilt the solution and below is the explanation I took to resolve it:
Sitefinity 4.4
I am not sure if you observed the output carefully when you build the solution or the sitefinity web app. These were just Warnings. Below is what I found:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3396,9): warning MSB3061: Unable to delete file "C:\Clients\Web\bin\Telerik.Sitefinity.xml". Access to the path 'C:\Clients\Web\bin\Telerik.Sitefinity.xml' is denied.
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3396,9): warning MSB3061: Unable to delete file "C:\Clients\Web\bin\Telerik.Web.UI.xml". Access to the path 'C:\Clients\Web\bin\bin\Telerik.Web.UI.xml' is denied.
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3396,9): warning MSB3061: Unable to delete file "C:\Clients\Web\bin\Telerik.Sitefinity.Model.xml". Access to the path 'C:\Clients\Web\bin\Telerik.Sitefinity.Model.xml' is denied.
1) Just to be safe restart the visual studio. This is just to make sure none of the files in bin folder are locked to VS process.
2) When you view bin folder properties - I saw read only option checked. Firstly, you need to have read/write permissions for this folder especially for the Network Service. But, I had given read/write permissions for network service for App_Data and bin folder which seemed to have changed.
3) Make sure your Source Control did not make the files read only on edit. In my case I did a complete project checkout for edit just to avoid any possible issues.
4) Got Latest on the bin folder from source.
Doing the above things fixed the issue. Hope this helps you.
Thanks!
Hello
I was still working on sitefinity,I rebooted it so I got this 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. |
Please I need a solution for the bug
Hi,
As stated in this topic the solution is to re-reference all assemblies for the project in visual studio. The easiest way is:
1. Copy all Sitefinity assemblies in a random folder on your hard drive. (take them from a working project)
2. In visual studio expand References section and delete all Sitefinity references.
3. Add the references from the folder you have created in step 1 to the project.
4. Build the project (F6), don`t rebuild or clean
5. The references are correct now an no assembly is missing.
It works ! thankx for help