Sanitizer provider is not configured in the web.config file. If you are using the HtmlEditorExtender with a public website then please configure a Sanitizer provider. Otherwise, set the EnableSanitization property to false.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Exception: Sanitizer provider is not configured in the web.config file. If you are using the HtmlEditorExtender with a public website then please configure a Sanitizer provider. Otherwise, set the EnableSanitization property to false.
Place the below section just below the openieng of "<configuration>" tag within the file "web.config"
<configSections>
<sectionGroup name="system.web">
<section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit"/>
</sectionGroup>
</configSections>
<system.web>
<sanitizer defaultProvider="AntiXssSanitizerProvider">
<providers>
<add name="AntiXssSanitizerProvider" type="AjaxControlToolkit.Sanitizer.AntiXssSanitizerProvider"></add>
</providers>
</sanitizer>
</system.web>
Anti-XSS can be easily obtained using NuGet. (Similar to previous post for installing AjaxControl Toolkit)
Visual Studio 2010 --> Tools --> Library Package Manager --> Package Manager Console -->
PM> Install-Package AntiXSS
You will get the below error if Anti-XSS is not installed:
Could not load type 'AjaxControlToolkit.Sanitizer.AntiXssSanitizerProvider'
Muito obrigado, funcionou e me ajudou muito.
ReplyDeleteUsed a google translate to understand this ;) But really it feels so good when I find a value for what I post.
DeleteThanks & good luck!
This code is not working on my visual studio 2012
ReplyDeleteError is
ReplyDeleteSanitizer provider is not configured in the web.config file. If you are using the HtmlEditorExtender with a public website then please configure a Sanitizer provider. Otherwise, set the EnableSanitization property to false.
Thanks Karan for the tip!
DeleteIt deserves a try on my next consumption for the Sanitizer Provide.