Just an FYI in case someone runs into the same issue...
Background:
I got this error on a recently upgraded application (ASP.NET 3.5 -> ASP.NET 4.0 plus a RadControls for ASP.NET AJAX version upgrade) . One thing to note is that there was no compilation error output to the browser. The controls would render on the page, but JS events would not fire. I launched the Firebug console on a page with issues, and found I was getting "ASP.NET Ajax client-side framework failed to load" and "Sys is undefined" client-side errors. I added the location tag with authorization for all users as directed in the troubleshooting post referenced many times in this thread, but that did not work. I double-checked the handlers and modules sections in the web.config, and BINGO! All the entries under system.webServer had a "runtimeVersionv2.0" parameter declared in the preCondition attribute.
web.config after upgrading the project to ASP.NET 4.0 and the latest Telerik release in VS 2010
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="RadUploadModule"/>
<remove name="RadCompression"/><add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode,runtimeVersionv2.0"/>
<add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode,runtimeVersionv2.0"/>
</modules>
<handlers>
<remove name="ChartImage_axd"/>
<remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
<remove name="Telerik_Web_UI_DialogHandler_aspx"/>
<remove name="Telerik_RadUploadProgressHandler_ashx"/>
<remove name="Telerik_Web_UI_WebResource_axd"/><add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
<add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
<add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
<add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
</handlers>
</system.webServer>
Clearly this is going to cause a problem on a site running 4.0.
Solution:
I edited the web.config file and removed the "runtimeVersionv2.0" parameter declared in the preCondition attribute (including the leading comma) from every tag in system.webServer where one existed. I saved the web.config file and restarted the web site in IIS Manager. The application worked properly after that.
I assume these extra runtime parameters were added when I originally ran the Telerik project configuration module in Visual Studio 2008 for this application when I wrote it in 3.5. Then when I upgraded the project to 4.0 in Visual Studio 2010 and used the Telerik project configuration module to upgrade the Telerik DLL by selecting the latest version of the DLL from the dropdown, the automated tool must have missed removing these parameters for some reason. If this is by design, I would like to know how I could have prevented it.