asp.net下出現其中的組件“訪問被拒絕”的解決方案

來源:互聯網
上載者:User

有時候,我們在調試ASP.net程式的時候,會很痛苦的碰到。某某組件訪問被拒絕。這時候重起IIS,電腦登出都不起作用。這時候的錯誤資訊一般類似如下的方式:

“/”應用程式中的伺服器錯誤。
--------------------------------------------------------------------------------
配置錯誤
說明: 在處理向該請求提供服務所需的設定檔時出錯。請檢查下面的特定錯誤詳細資料並適當地修改設定檔。
分析器錯誤資訊: 訪問被拒絕:“CSDN.Authentication”。
源錯誤:
行 196: <add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
行 197: <add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
行 198: <add assembly="*"/>
行 199: </assemblies>
行 200: </compilation>

源檔案: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config 行: 198
程式集載入跟蹤: 下列資訊有助於確定程式集“CSDN.Authentication”無法載入的原因。
=== Pre-bind state information ===
LOG: DisplayName = CSDN.Authentication
(Partial)
LOG: Appbase = file:///F:/MyDevelop/AD/Code/ADManageWeb
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: CSDN.Authentication
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/3151f96f/581ce000/CSDN.Authentication.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/root/3151f96f/581ce000/CSDN.Authentication/CSDN.Authentication.DLL.
LOG: Attempting download of new URL file:///F:/MyDevelop/AD/Code/ADManageWeb/bin/CSDN.Authentication.DLL.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: CSDN.Authentication, Version=1.0.1965.30523, Culture=neutral, PublicKeyToken=null
--------------------------------------------------------------------------------
版本資訊: Microsoft .NET Framework 版本:1.1.4322.2300; ASP.NET 版本:1.1.4322.2300

其中最常見的原因是Indexing service服務引起的。解決方案就是停用Indexing service,或配置ASP.net 的臨時目錄不受Indexing service服務的影響。

配置ASP.net 的臨時目錄不受Indexing service服務的影響的步驟如下:

1、開始 -- 管理工具 -- 電腦管理(Win2003的位置,其他動作系統類別似)開啟電腦管理
2、展開電腦管理左邊樹中“服務和應用程式”節點,再在其下展開“索引服務”節點,再在其下展開“System”節點,再在其下展開“目錄”節點。
3、在電腦管理的右邊我們可以看到配置的索引服務類別目錄。
4、在“目錄”節點上右擊滑鼠,選擇“建立”--“目錄”
5、在“添加目錄”對話方塊中,路經輸入框中輸入 ASP.net 的臨時檔案目錄。預設應該是:
c:\<WINDIR>\Microsoft.NET\Framework\<Version Number>\Temporary ASP.NET Files 目錄。
<Version Number> 指你要處理的.net版本。
6、在“包含在索引中嗎?”選項中,選擇“否”
7、單擊“確定”按鈕
8、在“索引服務”節點上按右鍵,重起索引服務即可。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.