2011-08-08 129 views
0

我似乎碰到了我無法通過的牆。我已經從IIS 6中將Episite移動到了IIS 7.5,並且也從cms 5升級到了6.現在,我啓動它時會出現以下異常。我確信在我的web.config中缺少一些東西,但是我不知道它是什麼。所有的幫助非常感謝。EPiServer初始化異常

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) 
+1

升級是否成功?如果您在IIS 6上運行升級的網站會發生什麼情況?在升級之前是否備份了數據庫和源代碼?你可以嘗試一次做一件事,看看它破裂的地方。 –

+0

是的,一切順利升級。我相信我現在知道什麼是錯的。將更新明天我只需要驗證它。 –

回答

0

似乎在EpiServerFramework.config的<scanAssembly forceBinFolderScan="false">與指定的文件來加載似乎並沒有工作。用反射器調試顯示它根本沒有加載任何模塊。改爲真正解決了這個問題。

不知道爲什麼它不加載指定的東西。

0

我試過將scanAssembly設置更改爲True

<scanAssembly forceBinFolderScan="false"> 

此解決方案對我無效。當我能夠將我的web.config轉換爲適用於IIS7時,我解決了我的問題。

該解決方案在CMD是Exec用管理員權限的命令:

C:\Windows\System32\inetsrv\Appcmd migrate config "Default Web Site/" 

這裏的一個技巧是使用/在網站名稱的末尾。