EPiServer初始化异常

发布于 2024-11-28 17:05:29 字数 1115 浏览 6 评论 0原文

我仿佛遇到了一堵无法逾越的墙。我已将 Episite 从 IIS 6 移动到 IIS 7.5,并从 cms 5 升级到 6。现在,当我启动它时,出现以下异常。我确信我的 web.config 中缺少某些内容,但我无法从它的 * 中找出它是什么。非常感谢所有帮助。

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)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无言温柔 2024-12-05 17:05:29

似乎 EpiServerFramework.config 中要加载指定文件的 似乎不起作用。使用反射器进行调试表明它根本没有加载任何模块。更改为 true 解决了问题。

仍然不知道为什么它不加载指定的。

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.

ζ澈沫 2024-12-05 17:05:29

我尝试了将 scanAssembly 设置更改为 True 的解决方案。

<scanAssembly forceBinFolderScan="false">

这个解决方案对我来说没有效果。当我能够将 web.config 转换为适用于 IIS7 时,我解决了问题。

解决方案是在具有管理员权限的 CMD 中执行该命令:

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

这里的一个技巧是在网站名称末尾使用 / 。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文