Today I came across easy to spot but nasty little problem when deploying ASP.NET app with Telerik ASP.NET AJAX controls.
When creating the project, some coleague of mine (propably) used old web.config file to create new app (because of some common classes and setting that we use). Anyway, with Cassini everything worked fine, but when deployed on IIS 7.5, I got an
‘~/Telerik.Web.UI.WebResource.axd’ is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager
error. I googled out in some discussions that : you should set the Managed pipeline mode from Integrated to Classic. This indeed solved the problem with behaving IIS 7.5 as old 6.0 (with handler registered in old web.config node), but I wasn’t convinced that to use Telerik’s controls, I should use old type of pipeline. That would be really strange. So I was searching around, what is the real problem.
I looked in web.config file and then it finally hit me. :)
Our old web.config file registered Telerik’s handler only in old <system.web> section for IIS 6 (and that sufficed for cassini and IIS 6.0) and not in new <system.webServer> section. So I had to add this piece of xml to web.config :
<add name=”Telerik.Web.UI.WebResource” path=”Telerik.Web.UI.WebResource.axd” verb=”*” type=”Telerik.Web.UI.WebResource, Telerik.Web.UI” />
(Please note, this snippet is dated 2011 – it worked at that time, I suppose in 2014 this will be generated in a different way)
This would be of course be added by RadScriptManager’s menu hidden in it’s smart tag in design mode, but we didn’t used this approach as everything worked on our dev machines.
So, when deploying to IIS 7.0 and up, don’t forget to register handlers to both nodes or use Telerik’s RadScriptManager menu option. :)
If you want to learn more :