1

大家好,当我通过 IIS 运行我的项目时,我收到了这个错误,如下所示

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 20:       <assemblies>
Line 21:         <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 22:         <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 23:         <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
Line 24:         <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />


Source File: C:\Users\furkan\Desktop\WebCity\WebCity\web.config    Line: 22 

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.
4

1 回答 1

1

好吧,我找到了解决方案。当您收到此错误时,您必须检查位于 bin 文件中的丢失的 dll 文件。

第一种方法是:

Microsoft.Web.Infastructure
System.Web.Helpers
System.Web.Mvc
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Deployment
System.Web.WebPages.Razor

您可以从 C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages 中找到这些 dll 文件,然后您必须将 dll 文件复制到您的项目 bin 文件夹中。

第二种方式是

在 Visual Studio 中打开您的项目,然后单击名称所在的引用

   Microsoft.Web.Infastructure
    System.Web.Helpers
    System.Web.Mvc
    System.Web.Razor
    System.Web.WebPages
    System.Web.WebPages.Deployment
    System.Web.WebPages.Razor

从属性中更改“复制本地=真”

于 2012-08-22T12:26:10.477 回答