AJAX fun with the dreaded ‘sys is undefined’ error

If you have started to play with AJAX then you have most likely come across the dreaded 'sys is undefined' error.  I found numerous articles on how to get this working but the best ones all point to making sure you have the correct entries in your web.config.   So to summarize what I have read:

1)  Go to C:Program FilesMicrosoft ASP.NETASP.NET 2.0 AJAX Extensions{your version of AJAX}

2)  Open the sample web.config file and make sure you have the same entries in your web.config

3)  If you don't then copy and paste is your friend πŸ™‚

4)  See if the app works now

 Here are a couple of articles to assist if you are still having issues:

Chris Riccio's blog   http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx

Lorin Thwaits's blog  http://geekswithblogs.net/lorint/archive/2007/03/28/110161.aspx


Comments (28)

  1. Raj says:

    I changed as per your instructions but it doesn’t work. But i found a soltuion read below:

    This problem comes if your web.config file is not in root folder or the folder is not an application in IIS. To solve this problem open IIS manager and browse to folder where your web.config is and right click the folder and choose properties from popup menu. Now if application name is not there then click on create button and click ok. That’s all it will work.

  2. JS says:

    Thanks Raj.  I couldn’t figure this out for a few hours, and finally saw your post.  I had my web.config in a subfolder instead of the root folder the website.



  3. aani says:

    Thanks, this worked.

  4. Teravus says:

    It turns out for me, I had Macromedia coldfusion installed on the same server.  This required me to add aspnet_isapi.dll as a wildcard handler or ScriptResource.axd returned a 404

  5. kvd117 says:

    Thanks alot.  This is one post that actually had the solution.

  6. zainnab says:

    Happy to help πŸ™‚

  7. atanos says:

    I’ve been trying to figure out how to use AJAX based on another application from my company, and this was the last step I couldn’t figure out.  Thanks so much for saving my sanity.

  8. kokkoro says:

    Thank you. It’s work and easy. πŸ™‚

  9. CJ says:

    I was having a tough time with this error. I was running this on IIS 7 on Vista and had already changed my app pool to "Classic" for previous AJAX functionality in the application. For some reason, when I changed the app pool back to default, restarted IIS then changed it BACK again to "Classic" everything worked fine. Apparently you have to make the app pool change after all AJAX functionality is added. Hope this helps someone.

  10. Perley says:

    Just another little one I came across when trying to add some AJAX/UpdatePanels to an existing web application.  The web.config file had the following line which caused the Sys.WebForms undefined problem in this case.

    <xhtmlConformance mode="Legacy"/>

    Since I didn’t see that mentioned anywhere I thought I would throw it out for the rare case when someone else runs across it.

  11. Tobias says:

    You need to create 2 empty files in your .net project:



    That fixed the ‘sys’ problem for me.

  12. Ramu says:


    I have changed sharepoint site web.config according to the web.config from %Program Files%Microsoft ASP.NETASP.NET 2.0 AJAX Extensions%version%

    Now its working fine



  13. Felipe says:

    yay, this really works!


  14. Chris says:

    Thank You!  This one had me scratching my head.  Updading the entries in the web.config solved the problem.

  15. Corey says:

    Creating 2 empty files in your .net project:



    fixed the ‘sys’ problem for me also, Big Thanks Tobias.

    (Visual Studio 2008, .NET 3.5, deployed to win2k3 server)

  16. Mayank Prajapati says:

    Thanks alot. It’s solved my problem.

  17. Eric says:

    Which web.config entries exactly?

  18. Grace says:

    Thanks, this solved my problem.  πŸ™‚

  19. Dinia says:

    thanks, I had forgotten the modules and handlers tags in the web.config πŸ™‚

  20. Rahul Sharma says:

    sys is undefined error show in Dot Net 3.5 .

    We are using Ajax Tool kit..

    Give me solution…………

  21. Mohamed says:

    MR.Corey .

    How you created the below files



  22. Srikanth says:

    How it will solved in Shared Hosting?

  23. Gunjan Soni says:

    Thank you Tobias. Adding ScriptResource.axd & WebResource.axd to my project resolved the error…. Thank You….

  24. Robert Downs says:

    If your developing for the intranet and you have this error look at the zone ie is showing, bottom right ,  we have a couple of polices running that was causing this error in the trusted zone,  I canged it to local intranet and it works.


  25. Mai says:

    and this had solved it for met! Thank you!! πŸ™‚

  26. Alpesh says:

    I am using Mvc and i don't have scriptmanager in my page and getting the same error what i need to do in this case?

Skip to main content