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()
a开发者_运维知识库t 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)
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.
I tried the solution the change scanAssembly settings to True.
<scanAssembly forceBinFolderScan="false">
This solution wasn't effective to me. I fixed my problem fixed when I was able convert my web.config to works with IIS7.
The solution was exec in CMD with admin privileges the command:
C:\Windows\System32\inetsrv\Appcmd migrate config "Default Web Site/"
A trick here is use / at the end of the name of website.
精彩评论