I have a perculiar error happening on a particular server , This issue isnt reproducible locally and also not happening on any other server . We have a page which has a couple of user controls and has a master page as well .
You could set
EnablePartialRendering to false in ScriptManager. In some cases, the ScriptManager control is on the master page and you do not need partial-page rendering capabilities for a content page. In those cases, you must programmatically set the EnablePartialRendering
property of the ScriptManager control to false for that content page.
None
0 Points
14 Posts
ScriptResource Uncaught Error: Sys.ArgumentNullException: Value cannot be null. Parameter name: p...
Feb 09, 2017 10:27 PM|buzzvishwanath|LINK
Hello All,
I have a perculiar error happening on a particular server , This issue isnt reproducible locally and also not happening on any other server . We have a page which has a couple of user controls and has a master page as well .
<%@ Page Language="C#" MasterPageFile="~/Client.master" AutoEventWireup="true"
Inherits="website.network.sales" CodeBehind="sales.aspx.cs" %>
<%@ Register tagPrefix="uc" tagName="Menusales" src="~/components/menu/menusales.ascx" %>
<%@ Register tagPrefix="uc" tagName="JobsaleSourceChart" src="~/components/network/Chart/JobsaleSourceChart.ascx" %>
<asp:Content ID="headercontent" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div id="printRegion">
</div>
<div id="nonPrintRegion">
<table cellpadding="0" cellspacing="0" border="0" style="clear: both">
<tr>
<td valign="top" width="210" bgcolor="#f2f2f2">
<uc:Menusales ID="Menusales" runat="server" />
</td>
<td width="735" valign="top">
<div id="holder2" class="summary">
<div id="summaryTop">
<uc:JobsaleSourceChart ID="chart" runat="server" />
This is the jobsale user control
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="JobsaleSourceChart.ascx.cs" Inherits="website.components.network.Chart.JobsaleSourceChart" %>
<%@ Register tagPrefix="uc" tagName="PageLoading" src="~/components/Common/PageLoading.ascx" %>
<%@ Register tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<asp:HiddenField ID="hdnJobID" runat="server" />
<asp:HiddenField ID="hdnChartType" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<uc:PageLoading ID="pageLoading" runat="server" />
<style type="text/css">
.ui-daterangepicker-arrows .ui-daterangepicker-prev {
left: 2px;
}
.ui-daterangepicker-arrows .ui-daterangepicker-prev, .ui-daterangepicker-arrows .ui-daterangepicker-next {position: absolute;top: 2px;padding: 1px;}
.ui-daterangepicker-arrows .ui-daterangepicker-next {right: 2px;}
.ui-daterangepicker-arrows input.ui-rangepicker-input {width: 158px;margin: 0 2px 0 20px;padding: 2px;height: 1.1em;}
</style>
<asp:Button CssClass="hiddenBtn" ID="hdnSbt" runat="server" OnClick="hdnSbtClick" />
<table border="0" cellpadding="0" cellspacing="0" class="PageHeading">
<tr>
<td>
<h2><asp:Literal ID="litTitle" runat="server"></asp:Literal></h2>
<h3><asp:Literal ID="litSubTitle" runat="server"></asp:Literal></h3>
</td>
</tr>
</table>
<div style="float:left; margin-top:-30px; position:relative; top:30px; width:210px; " id="divDT">
<asp:TextBox ID="txtDateRange" runat="server" CssClass="dpicker"></asp:TextBox>
</div>
<div class="main">
<asp:Panel ID="pnlChart" runat="server">
<asp:Chart ID="Chart1" runat="server"
Width="640" Height="350" BorderlineColor="Transparent" BorderlineWidth="0" OnClick="Chart1_Click" OnCustomizeLegend="Chart1_CustomizeLegend">
<Legends>
<asp:Legend Name="Legend1" MaximumAutoSize="40" IsDockedInsideChartArea="false"
IsTextAutoFit="False" BackColor="Transparent" DockedToChartArea="ChartArea1"
Docking="Top" Alignment="Near" LegendStyle="Row">
<Position Width="100" Height="6" X="0" Y="10" Auto="false" />
</asp:Legend>
<asp:Legend IsDockedInsideChartArea="false" MaximumAutoSize="40" Name="lgdChartType" IsTextAutoFit="False" BackColor="Transparent" DockedToChartArea="ChartArea1" Docking="Top" Alignment="Far" LegendStyle="Row">
<Position Width="50" Height="10" X="70" Y="0" Auto="false" />
<CustomItems>
<asp:LegendItem Name="LegendText" >
<Cells>
<asp:LegendCell CellType="Text" Text="Graph By" ForeColor="#999999" Name="Cell1">
<Margins Top="20" Bottom="20" />
</asp:LegendCell>
</Cells>
</asp:LegendItem>
<asp:LegendItem Name="LegendDay" >
<Cells>
<asp:LegendCell CellType="Image" Image="~/images/network/Charts/1-US.png" ToolTip="Daily" Name="Cell1" PostBackValue="ChatType/0">
<Margins Left="0" Right="0" />
</asp:LegendCell>
</Cells>
</asp:LegendItem>
<asp:LegendItem Name="LegendWeek" >
<Cells>
<asp:LegendCell CellType="Image" ToolTip="Weekly" Image="~/images/network/Charts/2-DS.png"
Name="Cell1" ImageTransparentColor="Black" PostBackValue="ChatType/1">
<Margins Left="0" Right="0" />
</asp:LegendCell>
</Cells>
</asp:LegendItem>
<asp:LegendItem Name="LegendMonth" >
<Cells>
<asp:LegendCell CellType="Image" ToolTip="Monthly" Image="~/images/network/Charts/3-US.png" PostBackValue="ChatType/2"
Name="Cell1" ImageTransparentColor="Black">
<Margins Left="0" Right="0" />
</asp:LegendCell>
</Cells>
</asp:LegendItem>
</CustomItems>
</asp:Legend>
</Legends>
<Series>
<asp:Series BorderColor="#5693c9" BorderWidth="4" ChartType="Area"
Color="230, 242, 250" Legend="Legend1" MarkerBorderColor="White"
MarkerColor="#5693c9" MarkerSize="8" MarkerStyle="Circle" Name="Jobs"
XValueType="DateTime" LegendText="Jobs Posted" YAxisType="Secondary">
</asp:Series>
<asp:Series BorderColor="125,172,214" BorderWidth="4" ChartType="Area"
Color="230, 242, 250" Legend="Legend1" MarkerBorderColor="White"
MarkerColor="#5693c9" MarkerSize="8" MarkerStyle="Circle" Name="Seek"
XValueType="DateTime" LegendText="Seek" >
</asp:Series>
<asp:Series BorderColor="224, 155, 73" BorderWidth="4" ChartType="Area"
Color="225, 224, 89" Legend="Legend1" MarkerBorderColor="White"
MarkerColor="224, 155, 73" MarkerSize="8" MarkerStyle="Circle" Name="Site"
XValueType="DateTime" LegendText="Website" >
</asp:Series>
<asp:Series BorderColor="100, 100, 100" BorderWidth="4" ChartType="Area"
Color="200, 200, 200" Legend="Legend1" MarkerBorderColor="White"
MarkerColor="100, 100, 100" MarkerSize="8" MarkerStyle="Circle" Name="Autopeople"
XValueType="DateTime" LegendText="Autopeople">
</asp:Series>
<asp:Series BorderColor="#3AB54A" BorderWidth="4" ChartType="Area"
Color="188,255,150" Legend="Legend1" MarkerBorderColor="White"
MarkerColor="#3AB54A" MarkerSize="8" MarkerStyle="Circle" Name="Internal"
XValueType="DateTime" LegendText="Referral">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" BorderWidth="2" ><Position Width="100" Height="100" X="0" Y="20" Auto="false" />
<AxisY LineColor="238, 238, 238" LabelAutoFitStyle="None" Title="Applications">
<MajorGrid LineColor="238, 238, 238" LineDashStyle="Dash" />
<MajorTickMark Enabled="False" LineColor="LightGray" />
<LabelStyle Font="Arial, 11px, style=Bold" ForeColor="#444444" />
</AxisY>
<AxisX IsMarginVisible="false" LabelAutoFitStyle="DecreaseFont" IntervalAutoMode="VariableCount">
<MajorGrid LineColor="238, 238, 238" />
<LabelStyle Font="Arial, 11px, style=Bold" Format="dd MMM, yyyy" ForeColor="#444444"/>
</AxisX>
<%-- <AxisY2 Enabled="True" LineColor="238, 238, 238" LabelAutoFitStyle="None" Title="Jobs Posted">
<MajorGrid LineColor="238, 238, 238" LineDashStyle="Dash" />
<MajorTickMark Enabled="False" LineColor="LightGray" />
<LabelStyle Font="Arial, 11px, style=Bold" ForeColor="#444444" />
</AxisY2>--%>
<%-- <Position Height="94" Width="94" />
<Area3DStyle WallWidth="1" />--%>
</asp:ChartArea>
</ChartAreas>
</asp:Chart>
</asp:Panel>
</div>
<script type="text/javascript">
//addLoadEvent(function() { FirejQuery(); });
Sys.Application.add_load(FirejQueryChart);
var run = false;
function FirejQueryChart() {
//hack
if ($('#divDT > div').length > 0) {
return;
}
$('#<%=txtDateRange.ClientID %>').daterangepicker({ arrows: true, dateFormat:'dd M yy',
onClose: function(dateText, inst) { $('#<%=hdnSbt.ClientID %>').click(); }
});
$('#lnkDTInit').click(function() {
$('#<%=txtDateRange.ClientID %>').focus();
$('#<%=txtDateRange.ClientID %>').click();
//$('#<%=txtDateRange.ClientID %>').datepicker('show');
$('#<%=txtDateRange.ClientID %>').daterangepicker('show');
});
$(".ui-daterangepicker-prev").click(function(event) { $('#<%=hdnSbt.ClientID %>').click(); });
$(".ui-daterangepicker-next").click(function(event) { $('#<%=hdnSbt.ClientID %>').click(); });
}
</script>
</ContentTemplate>
</asp:UpdatePanel>
Can someone point out whats wrong or should i put this in the IIS forum cause its happening only on a particular server
All-Star
17652 Points
3510 Posts
Re: ScriptResource Uncaught Error: Sys.ArgumentNullException: Value cannot be null. Parameter nam...
Feb 10, 2017 07:17 AM|Chris Zhao|LINK
Hi BuzzVishwanath,
You could set EnablePartialRendering to false in ScriptManager. In some cases, the ScriptManager control is on the master page and you do not need partial-page rendering capabilities for a content page. In those cases, you must programmatically set the EnablePartialRendering property of the ScriptManager control to false for that content page.
reference:
https://msdn.microsoft.com/en-us/library/bb398863.aspx
https://msdn.microsoft.com/en-us/library/bb386454.aspx
Best Regards,
Chris
None
0 Points
14 Posts
Re: ScriptResource Uncaught Error: Sys.ArgumentNullException: Value cannot be null. Parameter nam...
Sep 12, 2017 06:17 AM|buzzvishwanath|LINK
Hello Chris,
Thank you for the input , however how do we explain this from happening only on newly setup servers ?
Cheers
Vish