Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
12/16/2014 10:26:34 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

Hi,

I just upgraded my test and demo site with mojoPortal 2.4.0.7 and FormWizardPro 2.6.1.9 in order to test and validate the new versions before upgrading my client's sites.

Do do so, I visited the page where an instance of Form Wizard Pro is published and an error occurred.

Here follows the log record:

2014-12-16 17:12:37,310 ERROR 192.168.3.149 - it-IT - /form-wizard-pro.aspx - mojoPortal.Web.Global - 192.168.3.149 /form-wizard-pro.aspx Referrer(http://mojoportal.effectiveweb.it/Admin/ServerLog.aspx) useragent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
System.Web.HttpException (0x80004005): Il tipo 'AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider' è ambiguo: potrebbe essere derivato dall'assembly 'C:\Dati\IIS\EffectiveWeb\mojoportal\bin\AjaxControlToolkit.DLL' o dall'assembly 'C:\Dati\IIS\EffectiveWeb\mojoportal\bin\SanitizerProviders.DLL'. Specificare l'assembly in modo esplicito nel nome del tipo.
   in System.Web.UI.Util.GetTypeFromAssemblies(IEnumerable assemblies, String typeName, Boolean ignoreCase)
   in System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   in System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase)

Web server runs .NET 4.5 full trust.

Thanks in advance for your feedback.

Diego

 

12/16/2014 10:50:06 AM
Gravatar
Total Posts 18444

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

Hi Diego,

Steps to produce the error? Just visiting the page causes the error?

I'm not getting any error on my local machine nor on the demo site.

Did you use the new Web.config file?

Does Web.config file have this at the top:

<sectionGroup name="system.web">
      <section name="sanitizer" requirePermission="false" type="AjaxControlToolkit.Sanitizer.ProviderSanitizerSection, AjaxControlToolkit" />
    </sectionGroup>

and this lower down in the file:

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

I have both of those on my local machine and get no errors but I notice on our demo site I apparently did not use the new Web.config so those items are not there, and still no such error on the demo site.

I would say if you don't have that in Web.config then try adding it, but if you do have that then try commenting it out or removing it and see if that makes a difference.

If you remove it from the top make sure you keep this part:

<sectionGroup name="system.web"></sectionGroup>

Hope that helps,

Joe

12/16/2014 10:56:36 AM
Gravatar
Total Posts 18444

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

ok, I think I'm on to a clue. If the Form uses Html  question type that uses the ajaxcontrol toolkit wysiwyg editor and that seems to be broken. If I change a question for paragraph to html then I don't get an error on the demo site but suddenly I can't click into any form items. So html question type is broken and that may be causing you different errors.

So I would say as a workaround change any html question type to paragraph.

It seems the ajaxcontroltollkit is an endless source of headaches, Microsoft has done a terrible job with that thing.

12/16/2014 11:17:02 AM
Gravatar
Total Posts 18444

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

Hi Diego,

I was able to produce this error on my local machine and I seem to have found a solution.

Change this:

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

to this:

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

and uncomment this in the <tagMapping>:

<add tagType="System.Web.UI.ScriptManager" mappedTagType="AjaxControlToolkit.ToolkitScriptManager" />

Hope that helps,

Joe

12/16/2014 12:23:24 PM
Gravatar
Total Posts 1188
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

Hi Diego, thanks for reporting this, and thanks to you Joe for fixing it! I was having my own issue with a custom feature that used the UpdatePanelAnimationExtender from the Ajax Control Toolkit. In my case, after upgrading to the latest code and web.config changes my animations weren't firing, and the UpdatePanel postback was not completing at all. I could remove the UpdatePanelAnimationExtender from the control as a workaround, but that wasn't a great solution. Putting Joe's recommended changes into web.config fixed this issue completely. I suspect in my case the underlying problem was that the ScriptManager tag type was commented out.

Jamie

12/16/2014 12:38:38 PM
Gravatar
Total Posts 18444

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

I'm still battling through this problem. The fix I mentioned before seems to have uncovered another problem in the toolkit where the ajaxrating is broken, it will crash the page if the page has rating enabled on anything after making the change that fixes the other problem.

I really hate the ajaxcontroltoolkit, I need to be working on something else but yet again this thing is giving me headaches and making me work on this problem instead of what I need to be working on.

The worst part is that Microsoft seems to have washed their hands of any obligation to fix this thing, now DevExpress is supposed to be maintaining it but so far no-one has made any new release with any fixes for this turd.

I may have to go back to the previous version of the toolkit wew were using and then make a new release again if I can't figure out a solution to this.

Never once have I had a good experience updating to a new version of the ajaxcontroltoolkit, and this current one has been out since Dec 2013, and its been badly broken all this time

12/16/2014 12:44:14 PM
Gravatar
Total Posts 18444

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

also beware that some things in the current toolkit work when <compilation debug=true but problems happen when it is false ie in production

this is what I found when I made these changes on the demo site, it immediately crashed with an error about the rating control but with debug = true the error goes away

so the fix I mentioned may seem to fix it on your dev environment but it seems it will crash on production unless you let debug be true there

12/16/2014 12:47:55 PM
Gravatar
Total Posts 1188
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

Wow, okay, thanks Joe. I'll wait until you have stabilized all of the Ajax features you're using, then figure out how I need to deploy it to production. I don't think using debug=true would be too big of a problem--I know I've run in production with this set in the past (accidentally, since that's the default setting in the delivered web.config) and didn't have any adverse affects or performance issues that I could see.

Jamie

12/16/2014 1:49:04 PM
Gravatar
Total Posts 18444

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

I'm definitely going to have to revert back to the previous version of ajaxcontroltoolkit and make new releases of mojoPortal, Event Calendar Pro, Form Wizard Pro, and Web Invoice Pro, all of which use it.

I'll try to get those packaged up and released in the next few days.

 

12/16/2014 2:29:39 PM
Gravatar
Total Posts 1188
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

Ouch! Okay, Joe, thanks for the update.

12/18/2014 9:37:34 AM
Gravatar
Total Posts 18444

Re: Problems with FormWizardPro 2.6.1.9 and AjaxControlToolkit.Sanitizer.HtmlAgilityPackSanitizerProvider

fyi, I've just released mojoPortal 2.4.0.8 as well as updates to Event Calendar Pro, Form Wizard Pro, and Web Invoice Pro.

all have been changed back to the previous version of AjaxControlToolkit that we were using before

You must sign in to post in the forums. This thread is closed to new posts.