SignalR IE9 Invalid Domain Request Not Working

I am making an application using SignalR.

The hub is hosted on a single server running Windows Server 2012 with IIS 8. http://mentor.cloudapp.net/mass/rexona/previa/signalr/hubs .

The client is here: http://massdeveloperstage.com/Rexona/Site/colombia/Previa/Match?matchId=6F318A29-3400-444B-95D9-7EC41A7AD2D4

Signalr setup looks like this:

var match;
    $(document).ready(function () {
        $.connection.hub.loging = true;
        match = $.connection.match;

    match.client.addMessage = function (message) {
        var vm = {
            avatar: message.ProfileImageLocation,
            content: message.Text,
            user: message.UserScreenName,
            obj: JSON.stringify(message)
        };
         alert(vm.obj);
   }
  $.connection.hub.url = 'http://mentor.cloudapp.net/mass/rexona/previa/signalr';

    $.connection.hub.start().done(function () {
        match.server.addToGroup("97-987-PP");
    }).fail(function () {
          //alert("fail!");
    });

      

Everything works fine in Chrome, FF, Opera and IE10, but when accessing it through IE9, the application doesn't work.

Am I missing something in the connection setup? Do I need to enable something else on the server to work with IE9?

Thank.

+1


source to share


1 answer


I think you are trying to do CORS (Cross-Site Origin Sharing) in there. It doesn't work quite like it did in IE9, see this for a detailed discussion and microsoft's page for exact limits. This is done with a custom XDomainRequest object instead of XMLHttpRequest and ...

  • The target URL must be accessible using the HTTP or HTTPS protocols
  • The target URL must be accessible using only the HTTP GET and POST methods
  • Custom headers cannot be added to the request
  • Only text / plain info supported for the Request Content-Type header (no soap, json or encoded data types!)
  • No authentication or cookies will be sent with the request
  • Requests to intranet URLs can only be made from the intranet zone
  • Requests should target the same schema as on the hosting page


Edit: I didn't use SignalR itself at all, this answer was based on CORS in general. According to @stricq's comment, IE needs long polling for this to work with SignalR as described in here .

+1


source







All Articles