How to use SignalR with .net 3.5
Asked Answered
I

3

7

I would like to build a winform business solution using SiganlR, but I am not able to install .net 4.0 on the client machine. It looks like SignalR has a mininum requirement of .net 4.0. What is the best way to use SignalR from a winform and .net 3.5. I would like to include the send/receive message functions in the client application.

I will be hosting SignalR on IIS on my intranet using .net 4.0 on the server side.

Would it be possible to create and API (in .net 3.5) similar to pubnub C#? Can anyone point me in the right direction.

Impractical answered 20/2, 2012 at 23:2 Comment(0)
C
9

If you're not too scared of compiling your own stuff I have created a .net 2.0 compatible client library for SignalR. It's available right off my fork (https://github.com/robink-teleopti/SignalR) of SignalR.

At the moment I have no intent of making a pull request as I don't want to add that extra burden to the original project.

I have one more modification on my fork that can be good to know about. When having clients belonging to more than 20 groups I automatically switch to using POST instead of GET and I have made minor modifications on the server side to handle that part.

Cathexis answered 11/5, 2012 at 11:43 Comment(2)
Actually there is a .NET 3.5 client in the core of SignalR now. I still need to get it in the NuGet package though. But it was part of the last release.Hellion
@Hellion Do you remember the package version if it was ever released?Funds
D
2

I backported the v1.x and v2.x SignalR clients to NET35. Available as NuGet packages here: http://www.nuget.org/packages/Nivot.SignalR.Client.Net35/

Diagraph answered 7/2, 2014 at 3:29 Comment(4)
@Diagraph when I compile the project I end up in the bin folder with 3 dlls and 3 xml files, is that all I need to work with SignalR under .Net 3.5? Do I need any additional dlls?Tune
I guess the server would still require .Net 4.5?Tune
@RafaelDiaz Yes, the server still requires 4.5Diagraph
@RafaelDiaz Why not use the NuGet package manager in Visual Studio to add the assemblies to your project? Much less hassle.Diagraph
W
1

One of the authors of the SignalR project had a goal of using TaskParallelLibrary (TPL) that shipped in .NET 4. So I doubt any of the C# code from that project will run on .NET 3.5. Why not host a TCP or named-pipes WCF endpoint on the server and use normal .NET client callbacks? This is relatively easy if server is Windows Server 2008 with WAS or AppFabric.

If an older server you could host WebBrowser control and use SignalR javascript client library to handle signaling.

In another 6 months I'd bet on a native .NET 3.5 client library, but as the maintainers are full time MS employees I doubt they will have time to get to supporting legacy versions any time soon.

Wyckoff answered 21/2, 2012 at 2:52 Comment(1)
It would actually be pretty trivial to make a non tpl client but it just isn't a priority right nowHellion

© 2022 - 2024 — McMap. All rights reserved.