smarx.com

developing for the new web

Common causes of "Sys is undefined"

Thanks to a forum post, I just learned that Chris Riccio has a blog! Chris is a test manager on the ASP.NET AJAX team. I've never actually met him, but he and his team have answered a number of questions for me in email.

Anyway, the main thing I wanted to point here is that Chris has a post called Demystifying 'Sys is undefined'. That error message comes from the JavaScript code in the browser, and it basically means that the Microsoft AJAX Library hasn't been loaded. That could be for a number of different reasons, and the browser can't really tell you what went wrong. That's where Chris' post comes in. He describes a number of the common causes of this error and how to resolve them. Here's a sneak peak at his list:

    1. The browser fails to load the compressed script.
    2. The required configuration for ScriptResourceHandler doesn't exist for the web.config for your application.
    3. The virtual directory you are using for your web, isn't correctly marked as an application (thus the configuration isn't getting loaded).
    4. ScriptResource.axd requests return 404.

I'll leave it at that and let you go read his post for the details.

Jason Plank said:
When I received the error I found the problem was we we're overriding OnPreRenderComplete without making a subsequent call to base.OnPreRenderComplete(e).
Steve Marx said:
Interesting! That's a good gotcha to keep in mind too.

Add your own comment

Your name:
Your website/mailto:
Your comment: