Does DotNetNuke 6 support Ajax Control Toolkit?
Does any开发者_StackOverflow中文版body have successfully working module in DNN 6 with the Ajax Control Toolkit? My modules stopped working when we migrated from DNN 5.x to to 6.x. Modules compile without errors but I am getting client side script error:
'AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll'
Seems like this is conflict with Telerik's controls, according to information that I have found. But I didn't find any info how to fix it.
You should be able to use older versions of the ASP.NET AJAX Control Toolkit, but once they start requiring the ToolkitScriptManager
, you're out of luck with DNN (though you'll be out of luck with any version of DNN, since there's not a way to override the type of ScriptManager
it uses.
Starting with DNN 6, they use Telerik's RadScriptManager
. Previously, you could modify the core code to switch out for the ToolkitScriptManager
, but now switching out might cause other issues.
It could work together, but you'll need do some modifications to the core of DNN.
Here the list of things to do:
- Check that you're using latest version of .Net 4.0 binaries of AjaxControlToolkit (I was able to let it work for DNN 6.0.1 with Telerik 2011.01.519 and ACT September 2011 v4.1.50927)
- Check that in your web.config you have assembly binding redirects for
System.Web.Extensions
andSystem.Web.Extensions.Design
to the version 4.0 - Take DNN source package, find
Library\Framework\AJAX.cs
, locate methodAddScriptManager
, instantiation of RadScriptManager in it, for the version 6.0.1 look into line 54. Add one more property initializer:EnableScriptCombine = false
. Compile it (in Release configuration, of course), take DotNetNuke.dll and drop into your DNN installation.
You should be done.
Credits goes to Telerik support, despite it's stated there that it should work out of the box starting from 2010.1.625. Not sure, did I get them wrong, or they just reintroduced this bug.
P.S. DNN support promises to release version 6.1.0 in November with updated Telerik controls, which should fix this issue, at least on their opinion.
Just checked with nuke 6.1 and the last version of jaxcontroltoolkit - still the same error. It looks like it's not supported anymore. Sad:(
精彩评论