How to use SignalR with .net 3.5

2019-01-19 03:40发布

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.

3条回答
走好不送
2楼-- · 2019-01-19 03:44

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.

查看更多
3楼-- · 2019-01-19 03:54

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.

查看更多
狗以群分
4楼-- · 2019-01-19 03:58

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/

查看更多
登录 后发表回答