如何在 DNN 中使用 2sxc 修复“无法加载文件或程序集"System.Web.Helpers,Version=2.0.0.0"错误 [英] How to fix 'Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0' Error with 2sxc in DNN

查看:72
本文介绍了如何在 DNN 中使用 2sxc 修复“无法加载文件或程序集"System.Web.Helpers,Version=2.0.0.0"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个本地 DNN 站点,我正在尝试使用 2sxc 模块创建内容/应用程序,然后再将其放置在实际生产站点上.我尝试安装 Razor 教程应用程序,当我将它放在页面上时,我得到以下输出:

I have a local DNN site and I am trying to use the 2sxc module to create content/apps before placing it on the actual production site. I tried to install the Razor Tutorial App and when I place it on the page I am given following output:

Error: System.IO.FileLoadException: Could not load file or assembly 
'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
or one of its dependencies. The located assembly's manifest definition does not match 
the assembly reference. (Exception from HRESULT: 0x80131040) File name: 
'System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
at Connect.Dnn.Koi.DnnSkinFile.AutoDetect() at Connect.Koi.Context.HttpContextState.TryToDetectTheCssFramework() at 
Connect.Koi.Context.HttpContextState.get_CssFramework() at Connect.Koi.Context.ToolsForCurrentState.get_Css() 
at Connect.Koi.Koi.Is(String expectedCss) at ASP._Page_Portals_0_2sxc_Tutorial_Razor_shared__bootstrap4_cshtml.<EnsureBootstrap4>b__0(TextWriter __razor_helper_writer) 
in c:\inetpub\wwwroot\devsite\Portals\0\2sxc\Tutorial-Razor\shared\_bootstrap4.cshtml:line 5 at 
CallSite.Target(Closure , CallSite , _Page_Portals_0_2sxc_Tutorial_Razor_shared__helpers_cshtml , 
TextWriter , Object ) at ASP._Page_Portals_0_2sxc_Tutorial_Razor_shared__helpers_cshtml.<InitializedPageAssets>b__1e(TextWriter __razor_helper_writer) in 
c:\inetpub\wwwroot\devsite\Portals\0\2sxc\Tutorial-Razor\shared\_helpers.cshtml:line 73 at System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, HelperResult content) at 
ASP._Page_Portals_0_2sxc_Tutorial_Razor_shared__helpers_cshtml.<>c__DisplayClass1.<Title>b__0(TextWriter __razor_helper_writer) in c:\inetpub\wwwroot\devsite\Portals\0\2sxc\Tutorial-Razor\shared\_helpers.cshtml:line 2 at 
System.Web.WebPages.WebPageBase.Write(HelperResult result) at ASP._Page_Portals_0_2sxc_Tutorial_Razor__home_cshtml.Execute() in c:\inetpub\wwwroot\devsite\Portals\0\2sxc\Tutorial-Razor\_home.cshtml:line 3 
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) 
at ToSic.SexyContent.Engines.RazorEngine.Render(TextWriter writer) in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 65 at ToSic.SexyContent.Engines.RazorEngine.RenderTemplate() 
in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\2Sexy Content Razor\RazorEngine.cs:line 93 at ToSic.SexyContent.Engines.EngineBase.Render() in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\ToSic.Sxc\SexyContent\Engines\EngineBase.cs:line 92 
at ToSic.SexyContent.SxcInstance.Render() in C:\Projects\2sxc-dnn742\Website\DesktopModules\ToSIC_SexyContent\ToSic.Sxc\SexyContent\SxcInstance_Render.cs:line 29 WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

推荐答案

你是否检查过你的 web.config 类似的东西

Did you check your web.config for something like

  <dependentAssembly>
    <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
  </dependentAssembly>

这篇关于如何在 DNN 中使用 2sxc 修复“无法加载文件或程序集"System.Web.Helpers,Version=2.0.0.0"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆