0
votes

I am working on SignalR. Everything working fine in all browser except IE8. Here is my code.

<script src="~/Scripts/jquery.signalR-2.2.0.min.js"></script>
<script src="../../signalr/hubs"></script>

 $(document).ready(function () {
        var templateId = '@Model.TemplateId';
        var importNotifier = $.connection.runImport;
        importNotifier.client.sendMessage = function (data) {
            UpdateChart(data);
        };
        $.connection.hub.start().done(init);
        function init() {
            importNotifier.server.import(templateId, $("#hdnServerName").val(), '@ViewBag.ServerUserName', '@ViewBag.ServerPassword', '@ViewBag.AuthenticationType', '@ViewBag.DatabaseName');
        }
    });

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Tue, 22 Sep 2015 07:39:12 UTC

Message: Expected identifier, string or number Line: 88 Char: 13 Code: 0 URI: http://localhost:8092/signalr/hubs

Message: Expected identifier Line: 279 Char: 39 Code: 0 URI: http://localhost:8092/Graph/Graph/?TemplateId=27&IsUse=0

I am not able to understand why it is not working. I tried to insert http://localhost:8092/signalr/hubs to browser and its allow me to download.

2

2 Answers

0
votes

I websockets are not supported in IE8. First version that works with websockets is IE10.

Here's a list of browsers that support(or not) websockets: http://caniuse.com/#feat=websockets

0
votes

I finally resolved issue.I follow following steps

  1. uninstall all packages which is required for SignalR.
  2. Install again required packages.

I follow this step. because I was in impression that may there was some dependency issue. Then also my code was not working

  1. finally I change my method name "Import" to "InsertingData"

and its working now. So I can not conclude here that only name creates any problem (may be import is keyword in ie8) or there is some issue with dependency also.