[英]Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, win8
[英]How to fix 'Could not load file or assembly 'System.Web.Helpers, Version=2.0.0.0' Error with 2sxc in DNN
我有一個本地DNN網站,我正在嘗試使用2sxc模塊創建內容/應用程序,然后將其放在實際的生產網站上。 我嘗試安裝Razor Tutorial App,當我將它放在頁面上時,我會得到以下輸出:
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
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.