1

enter image description here

Unable to start SignalR in IE while using inside iframe. It is not working on any of IE version. It is works fine when we render normally in browser. Problem only with iframe.

@Scripts.Render("~/scripts/jquery")

        <script src="~/signalr/hubs"></script>
        @Scripts.Render("~/scripts/signalr")

        <script>
            $(function () {
            var hub = $.connection.signalrHub;
            hub.client.connection = function () {
            };
            SJ.iwc.SignalR.start();
        });
        </script>

My Bundle config:

bundles.Add(new ScriptBundle("~/scripts/jquery") { Orderer = order }.Include(
            "~/Scripts/jQuery/jquery-1.10.2.min.js",
            "~/Scripts/jQuery/jquery.signalR-2.1.2.min.js"
           ));

        bundles.Add(new ScriptBundle("~/scripts/signalr") { Orderer = order }.Include(
            "~/scripts/Signalr/iwc-all.min.js",
            "~/scripts/Signalr/signalr-patch.js",
            "~/scripts/Signalr/iwc-signalr.js"
           ));

Any one faced this issue in IE ?

D Aon
  • 143
  • 12

1 Answers1

0

Issue has been fixed by giving my script section inside @section scripts

@section scripts
{
     <script>
            $(function () {
            var hub = $.connection.signalrHub;
            hub.client.connection = function () {
            };
            SJ.iwc.SignalR.start();
        });
        </script>
}

Found this in below link: SignalR $.connection is undefined

David Aleu
  • 3,922
  • 3
  • 27
  • 48
D Aon
  • 143
  • 12