Failed to load file or assembly "System.Web.Http.WebHost ..." problem record

Source: Internet
Author: User
Tags webhost

MVC deployment to IIS problem logging:


Failed to load file or assembly "System.Web.Http.WebHost, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" or one of its dependencies. The system could not find the specified file.


If you do not use WEBAPI, you can delete the WEBAPI configuration. The operation is as follows:

NuGet Package Management-"Package management console, run the following command:
Update-package Microsoft.aspnet.webapi-reinstall



failed to load file or assembly Microsoft.Web.Infrastructure, version=1.0.0.0, culture=neutral, PUBLICKEYTOKEN=31BF3856AD

There are no microsoft.web.infrastructure.dll files.

Solution Method:

, the first: in the published project file in the bin file directory, add Microsoft.web.infrastructure.dll file.

The second type: Add Microsoft.web.infrastructure.dll under System32.

The second is not practical, recommend the first solution.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.