Search code examples
episerver

EPiServer InitializationException


I seem to have run into to a wall that I can't get passed. I have moved an Episite to IIS 7.5 from IIS 6 and also upgraded from cms 5 to 6. I now get the following exception when I start it. I am certain that there is something missing in my web.config but I can't for the * of it figure out what it is. All help is greatly appreciated.

System.TypeInitializationException: The type initializer for 'EPiServer.Security.PrincipalInfo' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at EPiServer.Configuration.Settings.get_Instance()
       at EPiServer.UriSupport.get_InternalUIUrl()
       at EPiServer.UriSupport.get_UIUrl()
       at EPiServer.UriSupport.ResolveUrlFromUIBySettings(String path)
       at EPiServer.Security.PrincipalInfo..cctor()
       --- End of inner exception stack trace ---
       at EPiServer.Security.PrincipalInfo.get_CurrentPrincipal()
       at EPiServer.Security.VirtualRolePrincipal.VirtualRolePrincipal_PostAuthenticateRequest(Object sender, EventArgs e)
       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Solution

  • Seems that the <scanAssembly forceBinFolderScan="false"> in the EpiServerFramework.config with specified files to load doesn't seem to work. Debugging with reflector showed that it didn't load any modules at all. Changing to true fixed the problem.

    Still no idea why it doesn't load the specified ones tho.