<add name="InitializationModule" type="EPiServer.Web.InitializationModule, EPiServer" />
So in my case I had to move all the relate+ modules above that module.
My modules section looks like this:
<modules runAllManagedModulesForAllRequests="true">
<add name="InitializationModule" 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" />
<add name="EPiServerCommon" type="EPiServer.Common.Web.HttpModule, EPiServer.Common.Web" preCondition="managedHandler" />
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="managedHandler" />
<add name="EPiServerMail" type="EPiServer.Mail.Core.Web.MailModule, EPiServer.Mail.Core.Web" preCondition="managedHandler" />
<add name="Dropit.Extension" preCondition="managedHandler" type="Dropit.Extension.Handlers.HttpModule, Dropit.Extension" />
<add name="KeepIdForEPiTrace" type="EPiTrace.KeepIdForDataHandler,EPiTrace" preCondition="managedHandler" />
</modules>
Which modules should be put above the InitializationModule?
Tried to move all modules below UrlRewriteModule above the InitializationModule. No errors has occured so far but I don't dare say that problem is solved just yet. Will try to trigger some reloads of the site to see if it hangs.
If it should solve the problem then I'm forever greatful because this issue has really bugged us for months now.
Since we moved the site to Windows server 2008 the fix found here
http://www.kulov.net/blogs/martin/2009/01/typeinitializationexception-in.html
for our ClassFactory problem, can not be used without getting a "Request is not available in this context"-error message. So this means that our problem with ClassFactory is back. However just occasionally. The site can run for days sometimes but then something happens that causes the site to restart and then it get into a deadlock with this error message
All I can do at this moment is to iisreset and after a few tries the site comes up again. This error also can occur if updating dll or web.config changes
This error started to occur after upgrade from EPiServer R1 SP3 to CMS R2 SP1. Read all forumposts on this issue but can't really apply none of the solutions. Our own code for the website does not hook into Global functions as one solutions points at and the site is upgraded successfully.
Our site/system is configured like this:
Windows server 2008 x64
EPiServer CMS 5.2.375.133
EPiServerMail 4.4.0.141 and EPiServerCommon hotfix applied
EPiServer Composer 3.2.5.115
Interactive Scene (Obg.CMS5 1.0.1.1, Obg.InteractiveScene.CMS5 1.3.100.23456)EPiServer Blog 5.2.375.133 with Demo templates functionality
SearchEngineSitemaps
The development environment is runned on Vista in Visual Studio 2008 and is debugged in VS Development Server. This environment does not have EPiServerMail, Composer, Interactive Scene or SearchEngineSitemaps installed.
Is there something with our code/configuration that can cause this type of error?
It seems weird that the site can run and be updated most of the times but then sometimes get in a deadlock state.
I am in desperate need of any advice on how to start debugging this problem so if anyone has anything to recommend please do.