Don’t forget to add Telerik’s WebResource handler to both sections in web.config file

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 :

<handlers>
    <add name=”Telerik.Web.UI.WebResource”  path=”Telerik.Web.UI.WebResource.axd” verb=”*” type=”Telerik.Web.UI.WebResource, Telerik.Web.UI” />
</handlers>

(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 :

http://www.telerik.com/help/aspnet-ajax/troubleshooting.html

http://msdn.microsoft.com/en-us/library/46c5ddfy.aspx

http://stackoverflow.com/questions/716049/what-is-the-difference-between-classic-and-integrated-in-iis7

12 thoughts on “Don’t forget to add Telerik’s WebResource handler to both sections in web.config file

  1. THANKS MATE! SAVED ME AGES. By the way the automatically generated version is different as compared to your version.

  2. glad to hear that, cheers sir 🙂

    this article is from beginning of 2011 so it might changed since then… in case you have a while you might post the latest version here, thx 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *