我有我的web.config文件中的問題。我在我的網站上添加HTML編輯器,並配置了web.config文件按照指令,但我收到此錯誤:類型「AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider」不明確
**Parser Error Message:** The type 'AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider' is ambiguous: it could come from assembly 'C:\Users\358676\Documents\Visual Studio 2012\WebSites\TheHubPortal\bin\AjaxControlToolkit.DLL' or from assembly 'C:\Users\358676\Documents\Visual Studio 2012\WebSites\TheHubPortal\bin\SanitizerProviders.DLL'. Please specify the assembly explicitly in the type name.
Source Error:
Line 15: <sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider">
Line 16: <providers>
**Line 17: <add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"></add>**
Line 18: </providers>
Line 19: </sanitizer>
這是我的代碼:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Admin.aspx.vb" Inherits="AdminPages_Admin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor" TagPrefix="asp" %>
<asp:HtmlEditorExtender ID="HtmlEditorExtender1" runat="server" TargetControlID="NewsBodyTextBox" DisplaySourceTab="true">
<Toolbar>
<asp:Undo />
<asp:Redo />
<asp:Bold />
<asp:Italic />
<asp:Underline />
<asp:StrikeThrough />
<asp:Subscript />
<asp:Superscript />
<asp:JustifyLeft />
<asp:JustifyCenter />
<asp:JustifyRight />
<asp:JustifyFull />
<asp:InsertOrderedList />
<asp:InsertUnorderedList />
<asp:CreateLink />
<asp:UnLink />
<asp:RemoveFormat />
<asp:SelectAll />
<asp:UnSelect />
<asp:Delete />
<asp:Cut />
<asp:Copy />
<asp:Paste />
<asp:BackgroundColorSelector />
<asp:ForeColorSelector />
<asp:FontNameSelector />
<asp:FontSizeSelector />
<asp:Indent />
<asp:Outdent />
<asp:InsertHorizontalRule />
<asp:HorizontalSeparator />
<asp:InsertImage />
</Toolbar>
</asp:HtmlEditorExtender>
任何幫助將是非常讚賞。謝謝!
你看了整個錯誤消息? 」 ...... *它可能來自程序集 'C:\用戶\ 358676個\文件\的Visual Studio 2012 \網站已\ TheHubPortal \ BIN \ AjaxControlToolkit.DLL' 或程序集「C:\用戶\ 358676個\文件\的Visual Studio 2012 \網站已\ TheHubPortal \ BIN \ SanitizerProviders.DLL」。**請明確指定的組件類型名稱。***」 – JDB
是的,我知道,我讀了整個錯誤消息。我試圖刪除這些DLL文件並再次添加,然後重建網站,但我仍然得到該錯誤。我不知道工作都是圍繞在這種類型的錯誤,這就是爲什麼我問,如果你們有任何想法或鏈接來解決這個問題。 –