I have a master page with the following code:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="True" EnableCdn="True" EnablePartialRendering="True">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
My SignalR Javascript code:
<!--Script references. -->
<!--Reference the jQuery library. -->
<script src="Scripts/jquery-3.6.0.min.js"></script>
<!--Reference the SignalR library. -->
<script src="Scripts/jquery.signalR-2.4.3.min.js"></script>
<!--Reference the autogenerated SignalR hub script. -->
<script src="signalr/hubs"></script><telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
$(function () {
// Declare a proxy to reference the hub.
// Error Line
var hub = $.connection.progressHub;
// Create a function that the hub can call to report progress.
hub.client.receiveMessge = function (Item) {
$('#<%=lblCurrRec.ClientID%>').html(Item.SITE_CODE);
$('#<%=lblStat.ClientID%>').html(Item.STATUS);
$('#<%=lblRes.ClientID%>').html(Item.MESSAGE);
};
hub.client.UpdateTotal = function (iTotal, iSent, iNotSent) {
$('#<%=lblTotal.ClientID%>').html(iTotal);
$('#<%=lblRecsProc.ClientID%>').html(iSent);
$('#<%=lblErrorRecs.ClientID%>').html(iNotSent);
};
$.connection.hub.start();
});
</script>
</telerik:RadScriptBlock>
When I run the code I get the following error:
Cannot read properties of undefined (reading 'progressHub')
If I put all this in it's own test page and replace the RadScriptManager with the following it works flawlessly:
<asp:ScriptManager ID="MainScriptManager" runat="server" EnablePartialRendering="true" EnablePageMethods="true" AsyncPostBackTimeout="600" />