2016-06-21 59 views
0

我已經在MVC 4中創建了一個Web應用程序,並將其託管在本地IIS中,並且它工作正常,但是當我託管它在第三方服務器即全球主機然後它給我錯誤,我的應用程序沒有運行。請任何人給我建議這是什麼在我的應用程序錯誤。 錯誤是...如何解決「無法加載文件或程序集」System.Web.Http,Version = 4.0.0.0「

Could not load file or assembly 'System.Web.Http, 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, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.

回答

0

最常見的點考慮:

→你必須確保引用的所有DLL,重建項目,並在服務器重新上傳。

→確保爲生產服務器中的站點使用的應用程序池啓用了32位應用程序支持。 (如果任何DLL需要32位支持,並且您尚未啓用它,則將面臨此類問題)

相關問題