簡體   English   中英

Web.Config 中的錯誤

[英]Error in Web.Config

請告訴我有什么用:

<add assembly="*"/>

因此,我收到錯誤:

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: Exception of type 'System.OutOfMemoryException' was thrown.

Source File: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\web.config 

謝謝

根據MSDN

您可以指定星號 (*) 通配符以將每個程序集添加到應用程序的私有程序集緩存中,該緩存位於應用程序的 \bin 子目錄或 .NET Framework 安裝目錄 (%systemroot%\Microsoft. NET\框架\版本)

由於您很可能不需要將所有程序集添加到您的應用程序中,我建議僅添加您實際使用的程序集,並保留<add assembly="*" />部分,這應該可以解決您的問題。

索引服務可能會導致此類問題。 如果 Indexing Service 正在您的計算機上運行,則應將其從索引目錄中排除:

  1. 從計算機上的管理工具中打開計算機管理。
  2. 導航到服務和應用程序下的索引服務。
  3. Select 索引服務下的“Web”。
  4. 在右側窗格中,右鍵單擊鼠標並選擇新建 > 目錄。
  5. 添加您的 web 頁面所在的路徑(例如:c:\inetpub)。
  6. 對不在 inetpub 下的所有虛擬目錄重復此操作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM