In Visual Studio 2012 ho creato un progetto ASP.NET MVC 4 in cui il framework di destinazione è il .NET Framework 4.5. Quando ho distribuito il mio progetto su un server web ha dato il seguente errore:Impossibile caricare il file o l'assembly 'System.Web.Http.WebHost, Versione = 4.0.0.0, Cultura = neutra, 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
Hai utilizzato la distribuzione Web o come l'hai distribuita? – John
@John ho pubblicato e quindi copio i file sull'host – user1688401
Sei in grado di pubblicare direttamente sul server? O usare il web deploy zip o qualcosa del genere? Ciò assicurerà che tutti i file siano inclusi. Assicurarsi inoltre che MVC sia stato installato sul server. – John