/ ASP.Net

Upgraded an ancient ASP.Net site and got ‘‘Sys is undefined’’

This is for future reference just in case you end up with the same case as I had.

The Problem

  • It's an old ASP.Net site that runs .Net 3.5. It uses Telerik UI controls.
  • I upgraded the project to Visual Studio 2015 from VS 2005. whoa I just realized that, ten years!
  • When it's time for me to run the website locally for the first time it went smooth until it opens a page where some AJAX/Telerik UI controls are used.
  • Javascript debugger gives me an error that ‘Sys is undefined’

What I did... but didn't work

  • added this on the <httpHandlers> section of the web.config. Well, actually they are already declared there.

  • <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="*" path="*_AppService.axd" 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> <httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> </httpModules>

  • added this to my web.config

  • <location path="Telerik.Web.UI.WebResource.axd"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location>

What made me finally solve the problem

  • Each Telerik control entry under the <modules> and <handlers> section has something like this
    <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
  • Notice that runtimeVersionv2.0? Remove that. Fixed!