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

RadMenu won't work on production machine

12 Answers 192 Views
Menu
This is a migrated thread and some comments may be shown as answers.
ChuckRock
Top achievements
Rank 1
ChuckRock asked on 02 Apr 2012, 06:36 PM
Hi,

I've gotten a simple radmenu to work fine on my development computer, but when it is uploaded to the production machine, the RadMenu will not respond to postback.  The radmenu is embedded in a master page that will then control what web pages the user goes to based on the selection from the menu.  Right now the 'Login' and 'Default' pages don't have anything but a marker to see if they load...

I'm just trying to get the basic framework working before fleshing out the menus and pages...

Since it works in VS2010 on my dev machine, I can't see why I would be having trouble on the production computer... (2008R2/ IIS7)

See below for code sample.

Thanks so much for looking at it... I'm stumped.

Master.Master
<%@ Master Language="VB" CodeFile="Master.master.vb" Inherits="Master" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
    <head runat="server">
        <title> Pc. </title>
        <link href="~/Styles/Pc/Site.css" rel="stylesheet" type="text/css"/>
        <asp:ContentPlaceHolder id="head" runat="server">
        </asp:ContentPlaceHolder>
    </head>
    <body>
        <script type="text/javascript"> var flag = false;</script>
        <script type="text/javascript">
            var AjaxIsActive = false;
 
            function RequestSent() {
                if (!AjaxIsActive) {
                    AjaxIsActive = true;
                }
                else {
                    alert('Wait for Page to Load');
                    return false;
                }
            }
 
            function ResponseEnd() {
                AjaxIsActive = false;
            }
        </script>
 
        <form id="form1" runat="server">
            <center>
                <div id="Header">
                    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
                    </telerik:RadScriptManager>
                    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Office2010Blue" EnableRoundedCorners="true"/>
                    <table id="header">
                        <tr>
                            <td align="left" style="width:300px">
                                <img src="./Images/Pc/Logo.png" alt=""/>
                            </td>
                            <td valign="bottom" align="right">
                                <table>
                                    <tr>
                                        <td>
                                            <telerik:RadMenu ID="Menu1" Runat="server" EnableRoundedCorners="true">
                                            </telerik:RadMenu>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
                <div>
                    <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
 
                    </asp:ContentPlaceHolder>
                </div>
                <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
            </center>
        </form>
        <script type="text/javascript"> flag = true;</script>
    </body>
</html>


Master.Master.VB
Imports System
Imports System.Web.UI.WebControls
 
Imports Telerik.Web.UI
 
Partial Class Master
    Inherits System.Web.UI.MasterPage
 
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
  
        If Not IsPostBack Then
            Menu1.LoadContentFile("~/App_Data/InMenu.xml")
        End If
 
        If HttpContext.Current.User.Identity.IsAuthenticated = True Then
            Try
                Menu1.FindItemByText("Login").Text = "Logout"
            Catch
            End Try
            'MenuToggle("Gap", True, True)
        End If
        ' Label1.Text += "1"
    End Sub
 
    Private Sub MenuToggle(ByVal theButton As String, ByVal theStatus As Boolean, ByVal theVisibility As Boolean)
        Menu1.FindItemByText(theButton).Enabled = theStatus
        Menu1.FindItemByText(theButton).Visible = theVisibility
    End Sub
 
    Protected Sub Menu1_ItemClick(sender As Object, e As Telerik.Web.UI.RadMenuEventArgs) Handles Menu1.ItemClick
        Label1.Text += "2"
        Select Case e.Item.Text
            Case "Login" : Response.Redirect("~/Login.aspx")
            Case "Logout" : FormsAuthentication.SignOut()
                Response.Redirect("~/Default.aspx")
        End Select
        Label1.Text += "3"
    End Sub
End Class

12 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 03 Apr 2012, 12:03 PM
Hello ChuckRock,

We have not encountered such issues regarding the RadMenu control so far. Can you please confirm if this is the case only when you use the RadMenu control or it happens to other controls as well?

Kind regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
ChuckRock
Top achievements
Rank 1
answered on 03 Apr 2012, 02:32 PM
Kate,

Thanks for getting back to me.

After fighting with this all day, I found a solution.  I'm not sure why, but if I switch the application pool from ASP.NET v4.0 to ASP.NET 4.0 Classic, the problem goes away.

Regards,

Chuck
0
Kate
Telerik team
answered on 05 Apr 2012, 10:27 AM
Hi Chuck,

Thank you for sharing your solution in the forum. I believe it would be useful for other developers that might encounter similar issue. Let me know if you have any other questions I can help you with.

All the best,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Nick
Top achievements
Rank 1
answered on 10 Mar 2014, 03:36 PM
I had a similar problem when we recently began upgrading our server to Windows Server 2012.  We have put off upgrading our telerik libraries because newer versions had problems on our Windows Server 2003 box.  When I moved our site to the new machine the new application pool defaulted to .NET 4.0 and the RadMenus were not displaying correctly.   Like Chuck I was able to correct the problem by pointing the pool to an older version of .NET.  Does anyone know what versions of the Telerik libraries are compatible with .NET 4.0?  I would like to start getting everything updated.

Nick
0
Kate
Telerik team
answered on 11 Mar 2014, 09:50 AM
Hello Nick,

Can you please clarify the version of the Telerik controls that you are using as well as the version of the .NET Framework? Can you also provide any additional details on your scenario that could help us replicate the issue that you experience?

Regards,
Kate
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

0
Nick
Top achievements
Rank 1
answered on 11 Mar 2014, 02:11 PM
Currently the site is running on Windows server 2012 in .NET Framework version 2.0.50727.  The site is referencing libraries Telerk.Web.Design, Telerk.Web.UI, and Telerk.Web.UI.Skins Versions 2012.2.912.35.  The runtime version corresponds to the .NET version.  By default when I first set up the site on the new 2012 server it defaulted the .NET Framework version to 4.0.30319.  As long as that was set the menus displayed like Chuck described.

Before the change I did get reports from users who were seeing something similar.  Not all users were experiencing the same problem and I wasn't able to identify a local setting that was causing the issue for those who did report issues.  One said all they had to do was refresh their browser to solve the problem.  I'm sorry I don't have more details but was wondering if you know of other problems with these older libraries and newer browsers or operating systems.  I believe at least one user was using a tablet.

Nick
0
Kate
Telerik team
answered on 14 Mar 2014, 04:17 PM
Hello Nick,

Unfortunately currently we are not aware of such issues that occur with the RadMenu control when you click the items. However, I would like to kindly ask you to provide either some sample code that I can test from my side or a live url where I can observe the issue so I could inspect it and assist you in the most efficient way.

Regards,
Kate
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
0
Matt
Top achievements
Rank 1
answered on 08 May 2014, 11:49 AM
I have the same issue and I have that entry in my web.config however I'm still getting an error about Telerik being undefined and none of the Telerik controls work. Anyone have any other ideas?

0
Nencho
Telerik team
answered on 13 May 2014, 07:31 AM
Hello Matt,

Please refer to the following documentation article, where different solutions for the faced issue are listed:
http://www.telerik.com/help/aspnet-ajax/introduction-troubleshooting.html

Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Nathan
Top achievements
Rank 1
answered on 09 Aug 2015, 10:04 PM
Thank you very much, this worked for me
0
Archana
Top achievements
Rank 1
answered on 15 Jun 2016, 05:37 AM

Hi,

I'm Using Radmenu in my master page, after deploying my application, the menu and content works fine on my machine, but unfortunately I can't able to see the menu in mobile only main content is visible. I have VS2015 and framework 4.5.2, my code snippet below,

<form id="form1" runat="server">
    <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
    <div id="wrapper">
        <telerik:RadPageLayout runat="server" ID="MasterLayout" GridType="Fluid">
            <Rows>
                <%--Header--%>
                <telerik:LayoutRow CssClass="header">
                    <Columns>
                        <%--Logo--%>
                        <telerik:LayoutColumn Span="2" SpanMd="3" SpanSm="12" SpanXs="12">
                            <a href="#" class="logo">
                               <img src="images/Koala.jpg" alt="site logo" />
                               
                            </a>                              
                        </telerik:LayoutColumn>
 
                        <%--Main Nav--%>
                       <telerik:LayoutColumn  style="Padding-left:90%;">                             
                           <telerik:RadLabel ID="lblUser" runat="server" Style="text-align:center" Font-Size="Larger"></telerik:RadLabel>  
                            <asp:LinkButton ID="btnLogout" runat="server" OnClick="btnLogout_Click">[Logout]</asp:LinkButton>
                                                                                                 
                        </telerik:LayoutColumn>
                    </Columns>
                </telerik:LayoutRow>
                 
                <%--Main--%>
                <telerik:LayoutRow>
                    <Columns>
                        <%--Sidebar--%>
                        <telerik:LayoutColumn Span="2">                         
                            <telerik:RadMenu runat="server" RenderMode="Auto" ID="RadMenu1" Flow="Vertical" DataNavigateUrlField="Navigation_URL" CssClass="RadMenus menuPane"
                                 DataSourceID="SqlDataSource1" DataFieldID="ID" DataFieldParentID="Parent_Menu"
                                 DataTextField="Application_Menu" Style="z-index: 5 ;width:120%" EnableRoundedCorners="true"
                                 EnableShadows="true" EnableTextHTMLEncoding="true">
                             </telerik:RadMenu>
 
                           
                                                                                                                                            
                        </telerik:LayoutColumn>
 
                        <%--Content--%>
                        <telerik:CompositeLayoutColumn Span="10" SpanMd="12" SpanSm="12" SpanXs="12">
                            <Content>
                                <asp:ContentPlaceHolder ID="MainMenu" runat="server">
                                </asp:ContentPlaceHolder>
                                <asp:ContentPlaceHolder ID="LeftMenu" runat="server">
                                </asp:ContentPlaceHolder>
                            </Content>
                        </telerik:CompositeLayoutColumn>
                    </Columns>
                </telerik:LayoutRow>                
            </Rows>
        </telerik:RadPageLayout>
    </div>
    
    <asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:dbConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [Application_Menu] as app_menu where (User_Id=@User_Id) order by app_menu.Order_ID ">
    <SelectParameters>
         <asp:SessionParameter Name="User_Id" Type="String"  SessionField="User_Id" />
    </SelectParameters>
    </asp:SqlDataSource>       
</form>
I tried changing the framework version and application pool, but no moves...

Please help me as soon as possible..

Thanks in advance,

Archie.

 

0
Nencho
Telerik team
answered on 17 Jun 2016, 01:26 PM
Hello Archana,

I have tested the demonstrated code snippet and it seems that everything is working as expected at my end, when the application is deployed - the menu is properly visible under mobile devices.

Could you please make sure that there are not js errors on your page. In addition, could you specify which version of our product you are currently using?

Regards,
Nencho
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Menu
Asked by
ChuckRock
Top achievements
Rank 1
Answers by
Kate
Telerik team
ChuckRock
Top achievements
Rank 1
Nick
Top achievements
Rank 1
Matt
Top achievements
Rank 1
Nencho
Telerik team
Nathan
Top achievements
Rank 1
Archana
Top achievements
Rank 1
Share this question
or