SignalR support in .NET 4

2019-01-17 03:51发布

Does SignalR support .NET 4.0. Or is it support only from .NET 4.5 upwards. Is there any link which provides with minimum requirements for SignalR.

7条回答
爷、活的狠高调
2楼-- · 2019-01-17 04:11

You can download entire web stack from codeplex and SignalR from github and compile it under .net4.0

查看更多
我只想做你的唯一
3楼-- · 2019-01-17 04:19

This is not the case any more, and the 2.x releases require .NET 4.5. https://github.com/SignalR/SignalR/issues/1723

查看更多
爷的心禁止访问
4楼-- · 2019-01-17 04:27

The last .NET 4.0 support for SignalR is version 1.2.2. Version 2 only works with .NET 4.5

Open the NuGet Package Manager Console and type:

Install-Package Microsoft.AspNet.SignalR.Client -Version 1.2.2
Install-Package Microsoft.AspNet.SignalR -Version 1.2.2 

This will install the SignalR (Client and Server) in your selected project (web project) automatically.

查看更多
我想做一个坏孩纸
5楼-- · 2019-01-17 04:27

The minimum requirements for SignalR is described here,

Which means your client can be WinForm/WPF application running on Windows XP.

查看更多
我命由我不由天
6楼-- · 2019-01-17 04:30

One thing to watch here is client/server .Net versions.

Most people know (but it's worth repeating) signalR can be hosted on Windows 2008R2 upwards. Windows 2008R2 has IIS7 and thus when hosted on IIS7 signalR cannot use WebSockets (as the old Windows http stack has no support for WebSockets). So that's ServerSentEvents or LongPolling. Not great for performance.

Windows 2012 upwards (and thus at least IIS8) offers support for WebSockets, which gets the amaziong C10K perf we're all after.

Now the interesting bit.

.NET clients.

If you only care about the browser skip this bit.

Any .Net clients that connect to a signalR back-end MUST use Windows8 upwards to use WebSockets The Microsoft networking stack (for .Net) in Windows7 does not contain WebSockets.

So don't use signalR with WebSockets if your client is Windows7.

OR... like us you'll need to use a custom WebSocket stack coupled with WebClient to handle the http handshake.

Hopefully this will help someone else!

查看更多
再贱就再见
7楼-- · 2019-01-17 04:34

There is one sample project at http://www.bluelemoncode.com/2013/02/default.aspx

It is good SignalR sample and working vs 2010 sp1 and .net framework 4.0. working properly.

http://www.bluelemoncode.com/file.axd?file=2013%2f3%2fSignalR_OneOneChat.zip

查看更多
登录 后发表回答