It's usually something in your web.config. Check that the upgrade didn't mess with your config's modules and handlers and also double check that the steps described here were followed:
Which type of web server throws the error?
I've put this one on hold for now, but I'll double check the steps in the blog post.
The IIS is 7.5.
I've tried doing the steps in the blog post again, but I still have the same error message.
Additionally, I've tried this nuget package: http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServerCMS6ToNetFour without any luck. The same error message persists.
I've also double checked that the correct (CMS6) version of System.ComponentModel.Composition.dll is referenced for projects that have initialization modules.
Edit - Some more info:
<add name="InitializationModule" type="EPiServer.Framework.Initialization.InitializationModule, EPiServer.Framework" preCondition="managedHandler" />
<add name="FirstBeginRequestModule" type="EPiServer.Web.InitializationModule, EPiServer" preCondition="managedHandler" />
<add name="Initializer" type="EPiServer.Scheduler.Initializer, EPiServer.Scheduler" preCondition="managedHandler" />
<add name="WorkflowRuntime" type="EPiServer.WorkflowFoundation.WorkflowSystem, EPiServer.WorkflowFoundation" preCondition="managedHandler" />
<add name="UrlRewriteModule" type="EPiServer.Web.UrlRewriteModule, EPiServer" preCondition="managedHandler" />
I'm running IIS 7.5 with .NET Framework 4 Application Pool in Integrated mode.
Any other suggestions are appreciated!
EPiServer support tipped my that I might need to reinstall all EPiServer programs on my development environment. So I reinstalled CMS, Relate and Composer. After that I haven't had any "ClassFactory" YODs yet, so the issue seems to have been resolved.
Im not sure if it's worth to mention but I noticed that my previous EPiServer Shared (in Windows' Programs & Features list) was version 1.1.454.0, while after reinstalling all EPiServer programs it was 1.1.432.0 (so in fact older). Also, I did not install EPiServer SEO this time around (as this was for testing purposes only).
I'm updating a CMS6 R1 site from.NET 3.5 to 4.0. Everything seems to work fine, but on site startup I always get this YOD message. If i hit F5 and refresh the page it loads fine, but it seems like the very first request at startup always fails.
After asking Google, I find that most people seemed to have this issue in CMS 5. The solution back then adding ModuleDependency attributes to modules inheriting from IInitializationModule. But this did not work for me, and the still error remains.
Any suggestions on how to proceed?