Getting SignalR 1.0 -pre release up and running.
I will share how to get a very very simple SignalRapp up and running. plus the code to download.
*This app doesn't do much but just so that you can see how it works. But it took me many hours since there are several versions out there and API changes so much so that none of the apps will work with different version of the SignalR.
Prepare
I've been trying to learn about SignalRand today was it. I did a nuget inside of visual studio and used the Install-Package SignalR command and that got me SignalR .5.3. But it's not what I saw at the MS Build conference. After some research I found a link to download a pre-release version of SignalR1.0.This is what you want to do.
- download Microsoft ASP.NET Fall 2012 Update BUILD Prerelease from here -http://www.microsoft.com/en-us/download/details.aspx?id=35493
- Nuget comand is Install-Package Microsoft.AspNet.SignalR –pre
#2 will install latest SignalR files including SignalRpre release version 1.0
Code
I will share how to get a very very simple .net C# code. I am using vs 2012. project is called signalR1pre.zipwhat you will find on that project.
- installed packages so you don't have to
- look at home.html on the root which should work
- same code in home/index.cshtml. (I had to wrap it inside of @section Scripts so that I won't get this error message: TypeError: $.connection is undefined)
#3 can happen if you referenced jQuery twice.
Download link
SignalR code
for reference:
http://weblogs.asp.net/davidfowler/archive/2012/11/11/microsoft-asp-net-signalr.aspx
No comments:
Post a Comment