В Visual Studio 2012 я создал проект ASP.NET MVC 4, где целевая структура .NET Framework 4.5. Когда я развернул свой проект на веб-сервере, он дал следующую ошибку:Не удалось загрузить файл или сборку «System.Web.Http.WebHost, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35»
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
Использовали ли вы развертывание в Интернете или как его развернуть? – John
@John я опубликовал, а затем скопирую эти файлы на хостинг – user1688401
Можете ли вы напрямую публиковать на сервере? Или использовать веб-развертывание почтового индекса или что-то еще? Это обеспечит включение всех файлов. Также убедитесь, что MVC установлен на сервере. – John