gpt4 book ai didi

asp.net-mvc-4 - 无法加载文件或程序集 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35'

转载 作者:行者123 更新时间:2023-12-02 02:52:22 24 4
gpt4 key购买 nike

在 Visual Studio 2012 中,我创建了一个 ASP.NET MVC 4 项目,其中目标框架是 .NET Framework 4.5。当我将项目部署到 Web 服务器时,出现以下错误:

    Could not load file or assembly 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file
specified.

Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where
it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or
assembly 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
The system cannot find the file specified.

Source Error:


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34237

最佳答案

我今天在部署过程中遇到了同样的问题。我能够通过将程序集标记为复制到部署文件来修复它。

为此,在我的 Visual Studio 项目中,选择引用中的 System.Web.Http.Webhost 程序集,并将“复制本地”属性更改为 True。我必须对其他一些丢失的程序集重复此操作。

感谢本网站的提示 - http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx/

关于asp.net-mvc-4 - 无法加载文件或程序集 'System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26533868/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com