This is a migrated thread and some comments may be shown as answers.

'Telerik is not defined' error when deployed to IIS7

4 Answers 212 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 31 Aug 2011, 09:31 PM
I have seen several posts about this error, and the general solution seems to be to make sure the Telerik Web Resource file is referenced in the <system.webServer><handlers> portion of the web config file. I have that reference in my web.config file, but I still get the error when a page containing a RadTreeView is loaded. The control won't load properly. Here is the entry from my web.config file:
<system.webServer>
    <handlers>
<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>

I reference the RadScriptManager in a MasterPage.

This works perfectly when I deploy the site to IIS6.0 but, not when I deploy it to IIS7.

Any recommendations as to how to fix this problem?
Thanks.

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 01 Sep 2011, 04:44 AM
Hello Roger,

Check the following help documentation which explains more about this.
General Troubleshooting.

Thanks,
Princy.
0
Roger
Top achievements
Rank 1
answered on 01 Sep 2011, 01:23 PM
Princy, thank you for your response. I have seen that link mentioned in the other threads that address this issue. I think I have done all the things described in that post that would address this problem:
  1. In my web.config file, I reference the WebResource.axd file, as I stated in my original post.
  2. In the MasterPage.master file, I make sure the line "<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />" is the first line within the <form> tag, and is before <telerik:RadCodeBlock>.

The application has always worked on my local machine (Windows 7 running IIS 6.1), and it has always worked on our development server (Windows Server 2003 running IIS 6). However, when I publish it to our production server (Windows Server 2008 running IIS 7) it will not work.

When I go to the home page of the site, Firebug reports:

  1. "Sys is not defined"
  2. "ASP.NET Ajax client-side framework failed to load"
  3. "NetworkError: 404 Not Found - http: //www.mywebsitename.com/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a8f393b2b-3315-402f-b504-cd6d2db001f6%3aea597d4b%3ab25378d2"

Here is what the MasterPage.master file looks like (in part):

<body>
    <div id="headband"></div>
    <form id="frmMain" runat="server" enctype="Multipart/Form-Data" >    
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server" >
        <script language="javascript" type="text/javascript" src="jquery/js/jquery-1.3.2.min.js" ></script>
        <script language="javascript" type="text/javascript" src="jquery/js/jquery-ui-1.7.2.custom.min.js" ></script>       
    </telerik:RadCodeBlock>
        <div id="main" class="container_12">
            <uc1:Header ID="header" runat="server" />
            <uc2:Nav ID="navigation" runat="server" />
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </div>
    </form>
</body>

Thanks for taking the time to look at this. I would really appreciate any pointers you can give.

PS: I have also tried putting the <script> tags inside the RadScriptManager (which is more correct, I am sure), instead of the RadCodeBlock. Like this:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <Scripts>
        <asp:ScriptReference Path="jquery/js/jquery-1.3.2.min.js" />
        <asp:ScriptReference Path="jquery/js/jquery-ui-1.7.2.custom.min.js" />
    </Scripts
</telerik:RadScriptManager>
But, I still get the same errors.
0
Roger
Top achievements
Rank 1
answered on 01 Sep 2011, 02:40 PM
Also, I have verified that the Telerik.Web.UI.dll is include in the publishing of the site (along with Telerik.Web.UI.xml). It is in the bin directory of the application, as it should be.

Is there any library or extension that has to exist on the server to make this work? The only thing I can think of is that something is missing on the production server that is present on my local machine and on the development server.
 
Thanks again.
0
Kiara
Top achievements
Rank 1
answered on 01 Sep 2011, 02:40 PM
Make sure that you set the Telerik http handlers registrations in the right place when using IIS 7 integrated mode, as said here.

HTH,
Kiara
Tags
General Discussions
Asked by
Roger
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Roger
Top achievements
Rank 1
Kiara
Top achievements
Rank 1
Share this question
or