0

ASP.NET 显示未在 web.config 中配置 AntiXssSanitizerProvider,但我添加了 3 个引用并将这些代码添加到 web.config 但仍然收到错误,即未在 web.config 中配置 AntiXssSanitizerProvider。请帮忙。

<configuration>
    <configSections>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
            <section name="sanitizer" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <applicationSettings>
        <sanitizer defaultProvider="AntiXssSanitizerProvider">
            <providers>
                <add name="AntiXssSanitizerProvider"     type="AjaxControlToolkit.Sanitizer.AntiXssSanitizerProvider"></add>
            </providers>
        </sanitizer>
    </applicationSettings>
4

1 回答 1

0

尝试@Bertzzie 在无法加载类型“AjaxControlToolkit.Sanitizer.AntiXssSanitizerProvider”中提供的解决方案。. 这个对我有用。

<sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider"> <providers> <add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"></add> </providers> </sanitizer>

于 2013-04-02T15:27:41.060 回答