New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Telerik Is Undefined Error Occurs When Running a Website on IIS 7+ Integrated Mode

Environment

Product Progress® Telerik® UI for ASP.NET AJAX

Description

I get an error message that Telerik is undefined when running my website in the Integrated mode on IIS 7+.

Error Message

'Telerik' is undefined.

Cause

For more scenarios concerning the Telerik is undefined error please check out the new dedicated KB article on the matter: Telerik is undefined.

When in its Integrated mode, IIS7 does not read the application configuration from the <system.web> section group of the application configuration file but from the <system.webServer> section group. Since Visual Studio 2005 does not provide native support for IIS7, the ScriptManager registration cannot be automatically added to the system.webServer.

Solution

To solve the issue, manually add the HttpHandler registration to the system.webServer section group.

Depending on the specific scenario, use either of the following approaches:

  • When Telerik.Web.UI.dll is in the GAC, use the following code (XML). Note that you have to replace [ASSEMBLY_VERSION] with the exact version of your DLL.

    <system.webServer>
    …
        <handlers>
        …
            <add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=[ASSEMBLY_VERSION], Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
        …
        </handlers>
    </system.webServer>
    
  • When Telerik.Web.UI.dll is not in the GAC, use the following code (XML):

    <system.webServer>
    …
        <handlers>
        …
            <add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" />
        …
        </handlers>
    </system.webServer>
    

For more information, refer to the Web Resources demystified blog post.

In this article