如何在 .net 3.5 中使用 SignalR [英] How to use SignalR with .net 3.5

查看:25
本文介绍了如何在 .net 3.5 中使用 SignalR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 SiganlR 构建一个 winform 业务解决方案,但我无法在客户端计算机上安装 .net 4.0.看起来 SignalR 的最低要求是 .net 4.0.从 winform 和 .net 3.5 使用 SignalR 的最佳方法是什么.我想在客户端应用程序中包含发送/接收消息功能.

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.

我将在服务器端使用 .net 4.0 在我的 Intranet 上的 IIS 上托管 SignalR.

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

是否可以创建和 API(在 .net 3.5 中)类似的 发布 C#?谁能指出我正确的方向.

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

推荐答案

如果您不太害怕编译自己的东西,我已经为 SignalR 创建了一个与 .net 2.0 兼容的客户端库.它在我的 fork 上可用(https://github.com/robink-teleopti/SignalR)SignalR 的.

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.

我对我的叉子还有一个修改,可以很好地了解一下.当客户端属于 20 多个组时,我会自动切换到使用 POST 而不是 GET,并且我在服务器端做了一些小的修改来处理那部分.

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.

这篇关于如何在 .net 3.5 中使用 SignalR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆