1

Actually I'm using node.js and socket.io to establish a socket connection. For some reasons I need to replace the server part with an ASP.NET application. Therefore I have to replace the existing socket.IO-server with a suitable .NET pendant.

From my understanding socket.IO as well as SignalR use websockets. So can I replace the socket.io-server with a signalR-server without or with even minimal changes in the clients?

Actually I tried to setup a SignalR-Server using the following example http://www.asp.net/signalr/overview/guide-to-the-api/hubs-api-guide-server

I'm able to connect to the hub when I use the sample code mentioned there.

But I'm not able to connect to this server using socket.IO or websockets in nodeJS. Maybe because of the magic with the hubs.

So is there any solution for an easy to use .NET package, hosted in IIS, that allows secured websocket-connections or secure tcp-socket connections between clients and my server. This solution should be quite standard so I can use Java or Node or anything else on client side?

Martin H.
  • 1,086
  • 1
  • 17
  • 28
  • What version of IIS you are using? (You need 8 - http://stackoverflow.com/questions/14128347/signalr-websockets-on-iis-7-5) – Alexei Levenkov Apr 28 '15 at 16:02
  • actually I use VS 2013 (Update 4) and IIS Express on Win 8 – Martin H. Apr 28 '15 at 16:04
  • and IIS Express is version 8.0 – Martin H. Apr 28 '15 at 16:06
  • FYI - SingalR uses long polling for IIS versions less than 8 and Web Sockets for IIS >=8, be sure to check in IIS if web sockets feature is enabled. – warrior Apr 28 '15 at 16:10
  • It is. Now I installed it on IIS 8.5 and Server 2012 - same results What's the correct endpoint to use when there's a SignalR-Hub in between? `var endpoint = 'http://myserver.com/signalR/myHub'; var socket = require('socket.io-client').connect(endpoint); console.log(socket); socket.on('connect', function () { console.log("connected"); socket.emit("blubb", {id: 1}); }); socket.on('connect_error', function (e) { console.log("not connected"); console.log(e); }); console.log("connecting");` – Martin H. Apr 28 '15 at 16:54

0 Answers0