Wednesday, January 03, 2007

"Sys is undefined" in MS AJAX RC 1 on VISTA

Today, I'm working on an article about Microsoft AJAX Control Toolkit, which is based on AJAX Core (AJAX Extensions on the serverside, AJAX Library including the clientside Javascript Framework).

So I downloaded the latest AJAX Control Toolkit Bits from Codeplex and installed the VS-Templates as well.

But, no sample code was working on my machine (VISTA, VS.NET 2005 SP1, IE7 and FF2)!

I've got always the following Script-Error: "Sys is undefined" (Sys is one of the major "classes" of the MS AJAX Library). It seems, that the browser is not able to detect the Script-Library, where this object is located.

I've checked the references to the AjaxToolkit.dll, did all the config mentioned in this thread (http://forums.asp.net/1516718/ShowThread.aspx) - no success.

If you google for "Sys is undefined" "AJAX" you will find loads of post about this problems. Seems to exist since ages...

At least, when I'm running the sample on a Windows XP (with IE7), everything work as expected. --> expected means correct!! :-)

10 comments:

Anonymous said...

If you can send me your web.config file in email (scottgu@microsoft.com), I can have someone take a look.

Typically this error happens when something isn't registered right, or if you have an authorization rule that is blocking downloading the script library.

Thanks,

Scott

Anonymous said...

*add open close tags*

httpHandlers

remove verb="*" path="*.asmx"/

add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"


add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"


/httpHandlers

Patrick Spieler said...

thanks, eric

but the code from my example seems to be okay. did all the hints from http://forums.asp.net/1516718/ShowThread.aspx, but still no sucess.

still trying to find a solution...

Denny Love said...

I'm getting the same problem. My scripts were working fine then I start getting the Sys is undefined error. If you get any luck with this please let me know.

Anonymous said...

Have same Problem but only in Standart.NET Pool. Switching to Default Pool fixes this problem but creates new one - debugginng is not possible.

Anonymous said...

I got this error. Replaced the web.config in my web solution by a web.config of a new AJAX enabled website project and got it working... May it helps you...

Regards
Shibu

Patrick Spieler said...

My problems with 'sys is undefined' are solved with RTM (http://sharpcuts.blogspot.com/2007/02/sys-is-undefined-in-ajax-rtm-solved.html). Thank's for all the input!

Knowlegespace said...

Check here the good explanation...
http://mangeshnerkar.blogspot.com/2008/07/demystifying-sys-is-undefined.html

Anonymous said...

wow Server Private Servers

Anonymous said...

Flyff private Flyff server