‘Sys’ is Undefined in ASP.NET AJAX

A project that I was updating recently didn’t start out its life as an ASP.NET AJAX enabled application so it was being upgraded to take advantage of some of the features and controls available in the AjaxControlToolkit. I added the necessary references to my project and added the assemblies to the Web.config and things seemed ok until I got to a page with an UpdatePanel on it and the dreaded ‘Sys’ is undefined error reared its ugly head. After a lot of head scratching and some failed Google-fu I finally manaeged to find a post which led me to my answer. I was missing the httpHandlers and httpModules configuration settings in my Web.config which if I had created a new ASP.NET AJAX enabled project from scratch would already have existed, adding them in and the error went away and now my UpdatePanel started to work as required.

<httpHandlers><br />
  <remove verb="*" path="*.asmx"/><br />
  <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br />
  <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br />
  <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"/><br />
</httpHandlers></p>
<p><httpModules><br />
  <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/><br />
</httpModules> 

Umbraco Certified Developer
SagePay Approved Partner
Creative Market