An ASP.NET Blog
I work for Microsoft and help people and businesses make better use of technolgy to realize their full potential. The opinions mentioned herein are solely mine and do not reflect those of my employer.

'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Friday, November 24, 2006 11:18 AM

This article is outdated considering that we have the released version of ASP.NET AJAX v1.0 which is what you should be using in your applications.  ATLAS was our codename for ASP.NET AJAX and if you are using ATLAS by any chance, kindly upgrade to ASP.NET AJAX by downloading the released version bits from http://ajax.asp.net . A related 'Sys' is undefined error article written by me is available at the following link:-http://geekswithblogs.net/ranganh/archive/2007/07/15/113963.aspx

First of all, let me write to you a personal note. I have been making this particular blog more and more of a non-technical stuff of late with my posts around IndiMix and other stuff. However, I am back here with my technical and trouble shooting articles.

You may get an error 'Sys' is undefined when developing ASP.NET AJAX Enabled WebSites using the ASP.NET AJAX Beta 2,

This error may come particularly if you are upgrading from Beta 1 to Beta 2.

The error is primarily because a new script resource handler is added which requires an entry in the Web.Config.

The following is the steps to solve this issue:-

1. Open the Web.Config file of your ASP.NET AJAX Enabled Web Application

2. Within the <httpHandlers> </httpHandlers> section, add the following entry

<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>

The <httpHandlers> section must be available within the <system.web> </system.web> sections in your web.config. In fact there would already be 2 add verb entries under which you can append the above entry.

3. Save the Web.Config file.

4. You must be able to run the pages without the error now.

5. This is well documented in the Release Notes that accompany the Beta installer. It is still available at your C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\ReleaseNotes.txt

This post is for the benefit of people who miss reading this information while installation.

Cheers !!!


Feedback

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

thanks a lot..finally the app is up and running 11/26/2006 1:31 PM | v

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Wow, great! Thank you very much! 11/27/2006 1:10 AM | Jeremy Hodges

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Harish,

We got some queries on ASP.NET AJAX:

I updated my site to use the newest AJAX B2 bits. Everything works fine on my machine and i deployed the ASP.NET App to the Web Server (windows 2003).

Result:

Could not load file or assembly 'Microsoft.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.


An "official statement" form the asp.net forums

Hi guys - yeah the problem you're having is because you installed on a machine w/o VS. All of our machines have VS, so we didn't catch this problem. On a machine w/ VS, Microsoft.Web.Extensions.Design.dll gets dropped.

Probably the best workaround for this is to go get that file from a machine with VS and either install it (gacutil -f Microsoft.Web.Extensions.Design.dll) or try dropping it into the bin directory, which I believe should also work but I haven't tried it.

I've been talking with the AJAX team about this, so we're on top of it. Sorry for the confusion.

I must repeat it: i have installed it on a webserver without installed Visual Studio 2005 and Microsoft never tested this scenario.

After coping the dll from my dev machine to the webserver (bin) it works.

11/28/2006 3:26 AM | Johnson Smith

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications


Hi Johnson,

The following is the response, I got from the Development Team. Thanks for providing your valuable feedback.

"We’ve actually fixed this issue in post-Beta2 bits.

The designer dll is now installed in the GAC as part of the general install regardless of the presence of a designer SKU on the box."
12/1/2006 8:35 AM | Harish Ranganathan

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

i have added Microsoft.web.extensions and microsoft.web.design.dll in my bin folder.

i uninstalled from my GAC.Site is working fine without following code in my master page.

"Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);"

I know its failure for obtaining reference as i do not call from GAC.
So let me know the solution. 12/19/2006 12:55 PM | Atit

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

It works fine now.
There is no need to install your AJAX asp.net 2.0 into GAC.If your host provider do not allow access to your GAC ,just add Microsoft.web.extensions and microsoft.web.design.dll into your bin folder.

I solved Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
by just adding previous code in

Microsoft.Web.UI.ScriptManager.RegisterStartupScript(Page, GetType(Page), "AtlasReference", "Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);", True)

So guys..you will never have any problem if you are not using GAC.
12/19/2006 1:52 PM | Atit

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

hello all,

thanks a lot.
i had solved this java script error.

thanks a lot once again

from,
Harsh Pandir 1/20/2007 6:25 AM | Harsh Pandit

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

I had the same problem with RC1

However, the namespaces have changed in RC1, the reference to Microsoft needs to change to System:

<httpHandlers>
<add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>
</httpHandlers>

Mike 1/21/2007 8:47 PM | Mike Trebilcock

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

MIKE ,
thanks for the SYSTEM part !

Bilal. 1/24/2007 12:46 PM | Bilal

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Hey Thanks a lot Mike !
1/31/2007 6:50 AM | Abhijeet

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thanks a lot Mike... I solved the error... 2/10/2007 8:46 AM | Anand

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thanks a lot! you solved my problem! 2/13/2007 8:43 PM | Carlos

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

I still have the problem 2/19/2007 1:34 AM | Steve

# 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Hi i have done every thing you said over here but still get the same error Sys is undefined. previously i used to get the error in only one page, even other pages having the update panels are working fine. but now i get this error even on the page where i have no update panel. this application works fine with firefox browser.
thanks 2/22/2007 4:02 PM | guru

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

thanx mike.. that was wht i was missing... 2/27/2007 3:25 AM | Kaushal

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

I tried everything suggested here and other sites. Couldnt get it to work.
However problem went away when I put the sections to load the scripts in the <head> section:

<head runat="server">
<title>Untitled Page</title>
<SCRIPT language="JavaScript" src="script/glm-ajax.js"></SCRIPT>
<SCRIPT language="JavaScript" src="script/MicrosoftAjax.js"></SCRIPT>
<SCRIPT language="JavaScript" src="script/MicrosoftAjaxTimer.js"></SCRIPT>
<SCRIPT language="JavaScript" src="script/MicrosoftAjaxWebForms.js"></SCRIPT>
</head> 3/3/2007 10:25 AM | Hilary Ngeno

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

I still have this problem, tried so much. Somebody an idea?
Thanx

Rutger 3/5/2007 7:42 PM | Rutger van Hagen

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thank's a lot! Mike. 3/15/2007 7:25 PM | Manoj

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Mike,

Thanks so much for the help. Your post helped me to correct the problem.

:) 8/9/2007 4:34 PM | Mario Estevez

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

thanks, that System.Web handlers works great after I have rebuild whole solution :-) thanks again Mike :)

Tomas 9/9/2007 2:28 AM | Tomas

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Add this in <httpHandlers>
<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"/> 11/12/2007 1:38 AM | Ovi04

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

I am getting this error only in secure mode(https). Anyone know how to solve this problem? 12/27/2007 5:34 PM | manoj

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

None of the above work for me and i solved it like this

put all your script code on javascript and point it inside script manager tag like this

<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Path="Script/PostBackScript.js" />
</Scripts>
</asp:ScriptManager>


Suresh Behera 1/7/2008 5:40 AM | Suresh Behera

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Harish,

good afternoon.

thanks for providing <system.web> tag info in your posting to locate httpHandlers. that helped me create a system.web tag because there was none. i started with a template from esri on web mapping application before i installed the latest ajax from ms's website (28 jan 2008).

i will go through the other posts and resolve the still pending Sys is undefined. there is some information about declaring some variables before the sys.application.initialize();

thanks once again for your service in the form of this blog.

regards
ravichandran. 1/28/2008 8:15 AM | Ravichandran M. Kaushika

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Guys, Finally resolved problem...thanks to ravichandran, made little change

<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>

if word "Microsoft" in verb creates problem use System instead ..revised verb will be

<add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/>

Hope this helps

2/1/2008 3:02 AM | Joseph

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

If all else fails, delete your website, then recreate it. This worked for me after trying everything else... took 2 days to figure this out.
2/3/2008 4:24 AM | steph

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

This error is so annoying. I purchased Telerik and it works like a charm. That's what happens when you work with Microsoft. 2/12/2008 7:04 PM | Fed up with AJAX 1.0

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thanks alot it is working fine by adding

<httpHandlers>
<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"/> 2/28/2008 3:48 AM | sathishkumar

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thanks Joseph

<add verb="GET" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler" validate="false"/> worked for me
3/6/2008 3:21 PM | tar

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

I removed the following procedure from global.asax & it worked fine

Protected Sub Application_AcquireRequestState(ByVal sender As Object, ByVal e As System.EventArgs)

End Sub 3/18/2008 12:05 AM | Bibhu

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thanks duman6 - siyah - bilgidepom 4/30/2008 1:07 PM | zavazingo

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Hi,
I am facing this kind of an issue now - will appreciate any help around this.

I am having a modal pop-up with some ajaxcontrols (Telerik Text Boxes and Drop Down Lists). I have a javascript code which returns values to the parent page: window.returnValue = strReturnString; _self.close();

I get the 'Sys' is undefined error whenever this javascript is invoked and the modalpopup closes. What is worth noting is that the error does not appear if I remove the window.returnValue... statement from the javascript function.

Any idea how to get rid of this problem

5/18/2008 6:56 PM | Dexter

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thanks joseph GOD BLESS U 5/21/2008 8:48 PM | Wasi

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Guys,
Excellent blog, just because people put different solution for the same issues, helped me resolve the issues.

Thanks a lot,
Asif 6/11/2008 10:21 AM | Asif Kidwai

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

I had the very same issue. I created an ajax enabled website, ran it without modifications, it worked fine.

But when I added javascript to the page to handle some ajax specific tasks it broke. The fix I found was to place my javascript on the body tag instead of the header.

Hope this helps somebody. 6/19/2008 9:30 PM | Treasure Baloyi

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

try this
<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"/>

instead of

<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>

in httpHandlers block.
7/9/2008 7:49 PM | Harsh

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Here you can find the possible causes for this type of error.

http://mangeshnerkar.blogspot.com/2008/07/demystifying-sys-is-undefined.html 7/18/2008 12:51 AM | mangesh

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

It works very well using the top url in local computer. but when I access the top url in a client computer, it generates the error like this.
I am using the .Net framework 3.5 and sp1.

anybody can help me ? It's very urgent. 8/25/2008 6:55 PM | jacky

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thank you 9/5/2008 4:29 PM | parke

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thank you :) 9/5/2008 4:30 PM | rüya tabiri

# re: 'Sys' is undefined - ASP.NET 2.0 AJAX Extensions (ATLAS) Web Applications

Thank youu 9/5/2008 4:31 PM | rüya tabirleri

Post a comment





 

Please add 3 and 7 and type the answer here: