We are getting the below error in one of the environment, we are using RadGridControl.
Below is the stacktrace, any help would be appreciated.
Thanks.
[NullReferenceException: Object reference not set to an instance of an object.]
Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer) +113
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +306
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +245
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +50
Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +666
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Page.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4942
5 Answers, 1 is accepted

Can you specify the scenario in which you are the error. Please provide the code so that i can replicate.
Thanks,
Princy.

The issue that we are facing is specific to an environment, part of trouble shooting the actual issue, we have created the below test page, it doesn't have any code behind or binding logic, we are just using the RadGrid control in the aspx page. This page loads fine in the Dev box but getting the mentioned error in one of the environment.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TRADSample.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
title
>TEST</
title
>
<
style
type
=
"text/css"
>
div.log {
border: silver 1px solid; background-color: white; padding: 3px 10px 3px 10px;
}
div.log .left {
float: left; font-weight: bold; font-size: 125%;
}
div.log .right {
float: right; font-weight: bold;
}
div.log .text {
overflow:auto; max-height: 200px; width: 100%; padding: 0px 10px 0px 0px;
}
</
style
>
</
head
>
<
body
>
<
form
id
=
"pageActivitySummary"
runat
=
"server"
>
<
telerik:RadScriptManager
runat
=
"server"
ID
=
"RadScriptManager"
/>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager"
runat
=
"server"
DefaultLoadingPanelID
=
"LoadingPanel"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"rgdActivitySummary"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rgdActivitySummary"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"LoadingPanel"
runat
=
"server"
></
telerik:RadAjaxLoadingPanel
>
<
h1
><
asp:Label
ID
=
"lblActivity"
runat
=
"server"
></
asp:Label
></
h1
>
<
telerik:RadGrid
ID
=
"rgdSummary"
runat
=
"server"
DataMember
=
"ActivitySummary"
AllowSorting
=
"false"
ShowHeader
=
"false"
BorderStyle
=
"None"
>
<
MasterTableView
DataKeyNames
=
"ActivityLogID"
>
<
ItemStyle
BackColor
=
"#EEF0F6"
ForeColor
=
"#333333"
/>
<
AlternatingItemStyle
BackColor
=
"#EEF0F6"
ForeColor
=
"#333333"
/>
<
SortExpressions
>
<
telerik:GridSortExpression
FieldName
=
"CreatedOn"
SortOrder
=
"Descending"
></
telerik:GridSortExpression
>
</
SortExpressions
>
<
Columns
>
<
telerik:GridTemplateColumn
HeaderText
=
"ActivityLog"
UniqueName
=
"ActivityLog"
>
<
ItemTemplate
>
<
div
class
=
"log"
>
<
span
class
=
"left"
>
<%# String.Format("{0:MMM dd yyyy HH:mm} - {1}", DataBinder.Eval(Container.DataItem, "CreatedOn"), DataBinder.Eval(Container.DataItem, "LogType"))%>
</
span
>
<
span
class
=
"right"
>
<%if (SolType == 0) {%>
<%# string.Format("CreatedBy" + " {0} | " + "PerformedBy" + " {1}<
br
/> <
br
/>", DataBinder.Eval(Container.DataItem, "CreatedBy"), DataBinder.Eval(Container.DataItem, "PerformedBy"))%>
<% } else {%>
<%# string.Format("CreatedBy" + " {0} | " + "PerformedBy"+ " {1}<
br
/>" + "BillableTimeAS"+ " {2}", DataBinder.Eval(Container.DataItem, "CreatedBy"), DataBinder.Eval(Container.DataItem, "PerformedBy"), Convert.ToInt32(DataBinder.Eval(Container.DataItem, "BillableMinutes")))%>
<% } %>
</
span
>
<
div
class
=
"text"
><%# DataBinder.Eval(Container.DataItem, "LogText").ToString().Replace("\n", "<
br
/>") %></
div
>
</
div
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
form
>
</
body
>
</
html
>

The issue that we are facing is specific to one particular environment. Is there anything that I have to check like permissions or placing/registering the telerik controls dll in GAC etc.
The project is in VS 2012 also tested with VS 2010 and framework 4.0
I feel it may not be with the code because it is working fine in other environments.
I have don't have experience working with Telerik controls earlier. Any help would be appreciated.
Thanks.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TRADSample.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>TEST</title>
<style type="text/css">
div.log {
border: silver 1px solid; background-color: white; padding: 3px 10px 3px 10px;
}
div.log .left {
float: left; font-weight: bold; font-size: 125%;
}
div.log .right {
float: right; font-weight: bold;
}
div.log .text {
overflow:auto; max-height: 200px; width: 100%; padding: 0px 10px 0px 0px;
}
</style>
</head>
<body>
<form id="pageActivitySummary" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager" />
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" DefaultLoadingPanelID="LoadingPanel">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="rgdActivitySummary">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rgdActivitySummary" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server"></telerik:RadAjaxLoadingPanel>
<h1><asp:Label ID="lblActivity" runat="server"></asp:Label></h1>
<telerik:RadGrid ID="rgdSummary" runat="server" DataMember="ActivitySummary" AllowSorting="false" ShowHeader="false" BorderStyle="None">
<MasterTableView DataKeyNames="ActivityLogID">
<ItemStyle BackColor="#EEF0F6" ForeColor="#333333" />
<AlternatingItemStyle BackColor="#EEF0F6" ForeColor="#333333" />
<SortExpressions>
<telerik:GridSortExpression FieldName="CreatedOn" SortOrder="Descending"></telerik:GridSortExpression>
</SortExpressions>
<Columns>
<telerik:GridTemplateColumn HeaderText="ActivityLog" UniqueName="ActivityLog">
<ItemTemplate>
<div class="log">
<span class="left">
<%# String.Format("{0:MMM dd yyyy HH:mm} - {1}", DataBinder.Eval(Container.DataItem, "CreatedOn"), DataBinder.Eval(Container.DataItem, "LogType"))%>
</span>
<span class="right">
<%if (SolType == 0) {%>
<%# string.Format("CreatedBy" + " {0} | " + "PerformedBy" + " {1}<br /> <br />", DataBinder.Eval(Container.DataItem, "CreatedBy"), DataBinder.Eval(Container.DataItem, "PerformedBy"))%>
<% } else {%>
<%# string.Format("CreatedBy" + " {0} | " + "PerformedBy"+ " {1}<br />" + "BillableTimeAS"+ " {2}", DataBinder.Eval(Container.DataItem, "CreatedBy"), DataBinder.Eval(Container.DataItem, "PerformedBy"), Convert.ToInt32(DataBinder.Eval(Container.DataItem, "BillableMinutes")))%>
<% } %>
</span>
<div class="text"><%# DataBinder.Eval(Container.DataItem, "LogText").ToString().Replace("\n", "<br />") %></div>
</div>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</form>
</body>
</html>
Most probably the problem comes from the IDs of the RadScriptManager and RadAjaxManager controls you have set. The ID of these controls is the same as the name of the control class. In this case when you write in the code editor "RadScriptManager" to what are you referring to the class or to the instance? How the compiler should know?
Try to add one digit in the end of the IDs and check whether the issue would still replicate.
Kind regards,
Andrey
the Telerik team