2012-09-21 116 views
12

Tôi đã triển khai một trang web đến máy chủ và tôi gặp phải lỗi này. Tại sao tôi nhận được điều này?Lỗi cấu hình: System.Web.Helpers

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. 

Source Error: 


Line 16:  <assemblies> 
Line 17:   <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
Line 18:   <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
Line 19:   <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
Line 20:   <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 

Source File: C:\<path>\web.config Line: 18 

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


WRN: Assembly binding logging is turned OFF. 
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. 
Note: There is some performance penalty associated with assembly bind failure logging. 
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. 

Trả lời

26

Có vẻ như máy chủ mà bạn triển khai ứng dụng không cài đặt ASP.NET MVC 3. Nếu bạn không muốn cài đặt ASP.NET MVC 3 trên máy chủ, bạn cũng có thể bin deploy ứng dụng của mình.

2

Tôi đã gặp vấn đề tương tự và tôi đã cài đặt Cập nhật công cụ ASP.NET MVC 3 từ trang web của Microsoft và giải quyết sự cố.

Đồng thời kiểm tra xem C: \ Program Files (x86) \ Microsoft ASP.NET có sẵn trước khi cài đặt hay không. Như trong trường hợp của tôi thư mục này đã mất tích và sau khi cài đặt tôi có thư mục này và hội đồng đã đăng ký.

0

Tôi có tình huống sau. Một máy tính xách tay hoàn toàn mới với Visual Studio 2015 làm việc trên một dự án MVC3 hơi cũ hơn. Visual Studio 2015 và sau đó dường như không còn cài đặt MVC 3. Vì vậy, sau khi tải xuống AspNetMVC3ToolsUpdateSetup.exe và cài đặt nó, các tài liệu tham khảo đúng nơi tìm thấy (từ GAC). Và việc xây dựng hoàn thành không có lỗi, không cần thêm bước nào ngoài cài đặt này.