January 23, 2007

ASP.NET AJAX - Sys.Debug.isDebug Javascript Error

After updating to ASP.NET AJAX 1.0 you may get the following Javascript Error (especially for pages making use of animation):

"Sys.Debug.IsDebug is null or not an object"

or something else about Sys.Debug, depending on your browser of choice.

The issue is that the Javascript files being returned by IIS are cached copies from the previous release and are no longer valid with the code from the new release.

The fix is to run iisreset (or manually stop and restart IIS).

UPDATE: My cohort, Kyle Beyer, has put together a nice summary of the breaking changes for ASP.NET AJAX 1.0 RTM

Comments,

  • Trackbacks,
  • and Pingbacks
  1.  avatar Radas says:

    Thanks man ! Right on time. It has fixed my issue.

  2.  avatar says:

    Radas, glad to be of service.

  3.  avatar cozta says:

    Dan, actually one has to clear the temporary files as well.

  4.  avatar says:

    Cozta, by temporary files, do you mean ASP.NET temporary files on the server? Or that the user has to clear temporary files in the their browser? I have seen that the latter is true - a Ctrl-F5 will do the trick.

  5.  avatar Kenn says:

    I'm quite confused... I have 2 servers... Both run IIS. I can publish from VS2005 (all SP'd up) to one server and the animations play fine. The other throws the isdebug error.

    I've followed all the recommendations to date:

    1. Clear the Temp ASP.NET files at the server

    2. Clear the temp files at the client

    3. Ensure the AJAX install is current at the server

    No matter what I try, I can't lose the error on server one. I even set up a vanilla IIS on a different server and it published and worked like a champ.

    What else can I check/look for?

  6.  avatar says:

    Kenn, sounds like you've covered all the bases. I didn't really have all that much trouble correcting the issue. Basically, running IIS reset did it for me. With the symptoms that you have described, it sounds like the server you are having issues with does not have the newest AJAX bits installed.

  7.  avatar Kenn says:

    Thanks for the quick response. Maybe I've missed an instruction somewhere on installing the correct bits. Other than having the latest framework on the server and installing the extented toolkit, is there something else I can check to ensure all is as it should be?

  8.  avatar says:

    Kenn, you can check "Add or Remove Programs". You should have at least 2 new components installed:

    http://ajax.asp.net/downloads/default.aspx?tabid=47

    The ASP.NET AJAX Extensions 1.0

    The Futures January CTP

    You may also have the Sample Applications if you installed those.

    Those will all be listed in Add/Remove programs.

    Also, make sure that you uninstalled the previous versions of the extensions and the futures. I always uninstalled the previous before installing the new, so I don't know if it gives you any kind of warning or otherwise makes you uninstall the previous.

    If all else fails, you may want to uninstall the Ajax extensions and futures and try re-installing. I did have an issue once where the extensions seemed to be not working correctly and uninstall/reinstall fixed it. That was with an earlier version, though.

  9.  avatar kumar says:

    this works for me, thanks.

  10.  avatar Shail says:

    Thanks,

    It worked for me also

  11.  avatar Jason Short says:

    I just wanted to add that there are TWO 1.0 MSI's from Microsoft.  I was experiencing the same problem listed above and nothing would fix it on one of my servers.  I uninstalled / reinstalled and same problem still existed.  So on a total lark I redownloaded the 1.0 AJAX from Microsoft (I reinstalled using the same one that was already on the machine).  They are not the same size.  Both are called 1.0...  Hmmm.  One is about 70KB larger than the other.  My original download was from February 2007, I just downloaded again (Aug 2007) and 1.0 is different!  Wierd, but the "current" 1.0 did fix my problem.  So if you have 1.0 but are still getting this error uninstall, redownload, and reinstall.

Comments are closed.

Shortcuts

Where is Dan?


My Blog
My Blog
Twitter
Twitter
Facebook
Facebook
LinkedIn
LinkedIn
Flickr
Flickr
YouTube
YouTube
Delicious
Delicious
Foursquare
Foursquare
Pinterest
Pinterest
GetGlue
GetGlue
Pintley
Pintley
XBOX Live
XBOX Live
Last.fm
Last.fm
Windows Live
Windows Live
Telligent.com
Telligent
Graffiti CMS on CodePlex
Graffiti CMS
Popular

Recent Posts