I am having trouble with adding the required text to the web.config file for the HtmlAgilityPackSanitizerProvider. Even when I open the sample site from the toolkit in Visual Web Developer I get an error.
The element 'system.web' has an invalid child element 'sanitizer'.
Not sure how to get this to work.
This is the section of the toolkit sample site:
<configuration>
<configSections>
<sectionGroup name="system.web">
<section name="sanitizer" requirePermission="false"
type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" />
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings/>
<system.web>
<trust level="Full" />
<sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider">
<providers>
<add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"></add>
</providers>
</sanitizer>
Comments: I recieved this error: Config Error The configuration section 'sanitizer' cannot be read because it is missing a section declaration Until I realized you need to ensure that the <configSections> <sectionGroup name="system.web"> <section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" /> </sectionGroup> </configSections> Above the <system.web> Section. I still get the error in the .Jpeg but I don't get the Config Error anymore at runtime is above
The element 'system.web' has an invalid child element 'sanitizer'.
Not sure how to get this to work.
This is the section of the toolkit sample site:
<configuration>
<configSections>
<sectionGroup name="system.web">
<section name="sanitizer" requirePermission="false"
type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" />
</sectionGroup>
</configSections>
<appSettings/>
<connectionStrings/>
<system.web>
<trust level="Full" />
<sanitizer defaultProvider="HtmlAgilityPackSanitizerProvider">
<providers>
<add name="HtmlAgilityPackSanitizerProvider" type="AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider"></add>
</providers>
</sanitizer>
Comments: I recieved this error: Config Error The configuration section 'sanitizer' cannot be read because it is missing a section declaration Until I realized you need to ensure that the <configSections> <sectionGroup name="system.web"> <section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" /> </sectionGroup> </configSections> Above the <system.web> Section. I still get the error in the .Jpeg but I don't get the Config Error anymore at runtime is above