Chris Hammond
 Latest Posts

A fix for DotNetNuke ScriptManager Errors, Ajax issues

Last Updated Thursday, April 17, 2008 5:33 PM


By: Chris Hammond

 

This fix does not apply to DNN 4.8.2 or greater, 4.8.2 has a fix for the issue

Yesterday I posted that I had found a fix for the issues with the Ajax ScriptManager issues that have been occuring with DNN 4.7 and greater.

Well here it is! It's not pretty, but from my testing so far it appears to fix the problems I've been having here on www.ChrisHammond.com

THIS IS ONLY A TEMPORARY FIX. Please use this at your own risk, I provide it here just as am immediate fix that worked for me, test in your environment before making production changes!

To use this fix you're going to have to recompile the DotNetNuke Source package you can download from www.dotnetnuke.com. I've only tested this with 4.8.1 source, but I don't believe there should be any issues if you're trying to recompile 4.7.0 or 4.8.0. Here are the two files you need to make changes to.

source/library/components/framework/Ajax.vb

Line #148
        Public Shared Sub RegisterScriptManager()
            If Not IsEnabled() Then
                AddScriptManager(m_Page)
            End If
        End Sub

'ADDED THE FOLLOWING FOR THE FIX
        Public Shared Sub RegisterScriptManager(ByVal objPage As Page)
            If Not IsEnabled() Then
                AddScriptManager(objPage)
            End If
        End Sub


source/website/default.aspx.vb

Line #209
'register page with AJAX
'AJAX.RegisterPage(Me)
AJAX.RegisterScriptManager(Me)

Once you make these changes and recompile, you should get a new DotNetNuke.Dll file, I grabbed the one out of my source/library/bin folder, and deployed that to the BIN folder on my production website. I also copied the default.aspx.vb file to the root of my production website.

When you compile you can compile in debug or release mode, I chose to compile in release mode.

If you have any questions feel free to post them here.

This fix does not apply to DNN 4.8.2 or greater, 4.8.2 has a fix for the issue

Recent Comments

Hi Chris, The scriptmanager error was the first thing that greeted me after upgrading to 4.8.1 today. Excellent work if you've managed to fix this!. Now.. how can those of us who can't compile get hold of the relevant dll or other bits? Is it just one file we need?

Posted By: Rob Ax on Thursday, February 28, 2008 2:10 AM

I would love for you to email me your DLL and default.vb file

Posted By: Brad B on Thursday, February 28, 2008 5:59 PM

Chris! thanks for the fix. i think it is working for me. are you aware that each time you post there are multiple entries on your rss feed?

Posted By: Rafe Kemmis on Friday, February 29, 2008 9:54 PM

Yes if you can email a .dll that would rock! I would imagine since it's open source you should be able to, right? This is a welcome update.

Posted By: Rick Ryno on Friday, February 29, 2008 11:05 AM

Chris! thanks for the fix. i think it is working for me. are you aware that each time you post there are multiple entries on your rss feed?

Posted By: Rafe Kemmis on Friday, February 29, 2008 9:54 PM

How much testing has been done with this fix? We have made this change in our code-base for 4.7.0 and it seems that it caused another bug (maybe unrelated) with the SolPart menu used for the action links to stop working after a period of time. Does this use AJAX?

Posted By: Michael S on Wednesday, March 12, 2008 8:16 AM

I've been using this "fix" for the past few weeks without any issues here on this site. We also have it in place on a few other production sites as well.

Posted By: Chris Hammond on Wednesday, March 12, 2008 11:09 AM

Hi Chris, would you mind to email the fixed files to me also. I am having this problem and it is very annoying. Thanks

Posted By: Mark Townsend on Monday, March 17, 2008 4:13 AM
Are you saying to REPLACE the RegisterScriptManager method, or OVERLOAD it?
Posted By: Eric Maxwell on Wednesday, April 02, 2008 2:11 PM
Eric, my suggestion is to Upgrade to DNN 4.8.2. If you can't do that, create an overload for the method.
Posted By: Chris Hammond on Wednesday, April 02, 2008 3:08 PM
 Tags
  1. 11 items are tagged with .net
  2. 58 items are tagged with asp.net
  3. 44 items are tagged with Autocross
  4. 8 items are tagged with Baseball
  5. 9 items are tagged with Book
  6. 39 items are tagged with Boston Red Sox
  7. 29 items are tagged with Community Server
  8. 14 items are tagged with communityserver
  9. 17 items are tagged with Corvette
  10. 26 items are tagged with daily tips
  11. 92 items are tagged with Development
  12. 8 items are tagged with DNN
  13. 174 items are tagged with DotNetNuke
  14. 8 items are tagged with DotNetnuke Conference
  15. 25 items are tagged with DotNetNuke Development
  16. 11 items are tagged with DotNetNuke Tips
  17. 12 items are tagged with DotNetNuke Training
  18. 65 items are tagged with Fitness
  19. 110 items are tagged with Friends
  20. 43 items are tagged with Games
  21. 32 items are tagged with general Software Development
  22. 21 items are tagged with HDTV
  23. 18 items are tagged with Health
  24. 376 items are tagged with Life News
  25. 12 items are tagged with Microsoft
  26. 38 items are tagged with Music
  27. 11 items are tagged with OpenForce 07
  28. 85 items are tagged with Photography
  29. 13 items are tagged with Photos
  30. 89 items are tagged with Pictures
  31. 108 items are tagged with Places to See
  32. 20 items are tagged with Project 240Z
  33. 12 items are tagged with Project 350Z
  34. 21 items are tagged with Red Sox
  35. 19 items are tagged with Red Sox in St. Louis
  36. 7 items are tagged with Saint Louis
  37. 15 items are tagged with SCCA
  38. 7 items are tagged with School
  39. 416 items are tagged with SEO
  40. 203 items are tagged with Site News
  41. 8 items are tagged with Snow
  42. 8 items are tagged with Solo Nationals
  43. 28 items are tagged with St. Louis
  44. 271 items are tagged with Technology
  45. 33 items are tagged with Travel
  46. 17 items are tagged with Vista
  47. 16 items are tagged with Weblog
  48. 9 items are tagged with World Series
  49. 16 items are tagged with Xbox360
  50. 11 items are tagged with Zune

Copyright 2010 by Christopher Hammond