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

私は解決策を見つけました。このエラーが発生した場合は、不足している dll ファイルが bin ファイルにある場所を確認する必要があります。

最初の方法は次のとおりです。

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 フォルダーにコピーする必要があります。

2番目の方法は

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

プロパティから「Copy Local = True」を変更します

于 2012-08-22T12:26:10.477 に答える