19

I have a full-working ASP.NET MVC application (.NET Core, ASP.NET MVC 6).

I would now like to add a signalr to my application. Any samples for MVC with signalr?

agua from mars
  • 16,428
  • 4
  • 61
  • 70
selva
  • 887
  • 2
  • 7
  • 11

2 Answers2

31

The MusicStore sample on GitHub use signalR
and the BugTracker sample also
and you have a sample in the SignalR-Server repo
Or you can look at my sample on GitHub

agua from mars
  • 16,428
  • 4
  • 61
  • 70
  • 1
    As of now the samples don't seem to work. Microsoft.AspNet.SignalR.Server 3.0.0-beta5 needs an update to work with MVC 6.0.0-rc1-final. The app.UseSignalR() and services.AddSignalR() in Startup.cs don't exist any more. – Ovi Mar 21 '16 at 22:11
  • 1
    @Ovi, did you try my sample ? It should work for `RC1` – agua from mars Mar 22 '16 at 18:51
  • @aguafrommars: didn't work, I'm using "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", not "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-*". The problem will solve itself out in a couple of months anyway as things get out of RC. In the meantime I implemented a layman's version of plain JavaScript long-pooling as presented [here](http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery/) – Ovi Mar 23 '16 at 14:32
  • @Ovi, use the master branch, it's for rc1. The dev branch use rc2. – agua from mars Mar 23 '16 at 15:05
  • latest [official roadmap](https://github.com/aspnet/Home/wiki/Roadmap) says that SignalR is tentatively planned after Asp.Net Core 1.0.0 RTM – superjos May 30 '16 at 08:55
1

I don't believe there are any yet.

The next version of SignalR, version 3, is designed for ASP.NET Core, SignalR 2 doesn't support this. If you look on the ASP website https://www.asp.net/learn it doesn't mention that you can use SignalR with ASP.NET Core .

Since ASP.NET Core makes use of NodeJS rather then NuGet for client-side libraries, a Node module would probably be created for SignalR. Only time will tell what SingalR 3 will look like.

This is also a relevant question What is the development status of SignalR 3?

Community
  • 1
  • 1
Luke T O'Brien
  • 2,565
  • 3
  • 26
  • 38