我的 web.config 文件有问题。我在我的网站中添加了 html 编辑器,并按照说明配置了 web.config 文件,但出现此错误:
**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>
任何帮助将不胜感激。谢谢!