简体   繁体   中英

What are my options for self-hosting SignalR?

I want to add SignalR to my Windows service, written in C#, targetting .NET 4.0. The Microsoft.Owin.* packages appear to require .NET 4.5.

I'd also like to include NancyFX in the same process, for other reasons.

What's the best way to self-host SignalR?

I installed the signalR package (v. 1.1.2) using .net 4.0. Work as a charm. I cannot use 4.5 as I am still at VS2010.

I use it with a standard web project with a WebService handling the communication.

唯一需要4.5的Microsoft OWIN软件包是owinhost.exe(以前是katana.exe),您仍然可以使用普通的HTTP侦听器(Microsoft.Owin.Host.HttpListener)来自托管。

If you install the packages as listed at https://github.com/SignalR/SignalR/wiki/Self-host they should work just fine under .NET 4.0. It's worth remembering that you can always use the package manager console to explicitly install older versions of packages if you need to - although for SignalR at the time of writing there is no need to do this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM