Your official information source from the .NET Web Development and Tools group at Microsoft.
We received feedback that the current 1.2 version SignalR sample Nuget package doesn’t work in an MVC 5 project by default. Here are the repro steps and the necessary change to make it work.
1. Create a C# MVC 5 project in VS2013 Preview
2. Install Microsoft.AspNet.SignalR.Sample NuGet package
3. This installs SignalR package version 1.1.3. In the SignalR.Sample/StockTicker.html file, the script link still links to 1.1.2, so change it to 1.1.3 first.
5. What happened here is due to a bug in the 1.1.0-beta2 release of the Microsoft.Owin.Host.SystemWeb package, which will be fixed in future release. To work around this, the best way is to upgrade SignalR 1.1.3 to the latest 2.0 beta2 release.
6. Read http://www.asp.net/vnext/overview/latest/release-notes#TOC13 to understand the migration process from SignalR 1.x to 2.0. Migrating the sample package is a little bit simpler. First, upgrade the SignalR NuGet package to 2.0 Beta2 (select Include Prerelease in the drop-down at the top of the dialog):
7. A readme.txt file pops up talking about the hub registration. Compile to see the expected error message:
8. Delete App_Start/RegisterHubs.cs as it’s no longer used
9. In the root startup.cs file, add app.MapHubs(); in the Configuration method.
10. Change SignalR.Sample/StockTicker.html script link to 2.0
11. Run the html page, now you see that the SignalR sample works correctly.
The StockTicker sample package is open sourced at https://github.com/SignalR/SignalR-StockTicker. Currently it supports 1.x only, as SignalR 2.0 has not reached RTM yet. The sample will probably get updated by SignalR 2.0 RTM time.
I was hoping for a "Fix" that would work with 1.1.3. There are many scenarios where using a Beta package is simply not acceptable within a client's production code environment.
@David, we're working on it. Just a note, MVC5 and its packages are also beta at this time.
Thanks for the prompt response, and I agree that since MVC5 is also Beta, the point in this case is moot. My reasons for posting included the fact that I see this type of approach (usage of Beta software as a solution) far too often, and often it is not resolved for quite some time (if ever).
I also want to point out that based on what I am seeing in the preview, and as one of the ALM Rangers, I really like alot of what is being done!
Great Work, I was looking this type of example, keep it up.
If you want to ask any questions about signalR, you can ask in Stackoverflow or asp.net forums. For this sample, you can always take a look at the source: github.com/.../SignalR-StockTicker