signalr

SignalR: how to enforce authentication/terminate hub connections server side

强颜欢笑 提交于 2020-01-01 04:38:26
问题 This question is related to another thread, you can read here: Forms authentication with SignalR where I tried with the help and patience of the user dfowler to understand how enforce forms ASP .NET Forms Authentication on a SignalR Hub. Description of the problem: I want that only authenticated users can connect the SignalR Hub and receive/send messages. Intrusion scenario: the intruder can potentially capture/access the HTML and Javascripts of the web page accessing the temporary files on a

Are Microsoft.Owin types like OwinMiddleware and IOwinContext incompatible with other Owin servers?

假如想象 提交于 2020-01-01 04:11:07
问题 If I build an OWIN middleware using Microsoft.Owin types like OwinMiddleware and IOwinContext, would my middleware work with non-Microsoft Owin hosts/servers? I'm looking at the middleware classes for Nancy and SignalR and they seem very different from the OwinMiddleware base class that middlewares like the Cookie authentication middleware and WebApi is based on. I'm reading the spec but I'm still not clear if a non-Microsoft Owin server could work with the OwinMiddleware and IOwinContext

SignalR Secure Connection Between .NET Client and The Server

﹥>﹥吖頭↗ 提交于 2020-01-01 01:59:06
问题 On SignalR .NET, we establish a connection as below between the client and server: var connection = new HubConnection("http://mysite/"); Next, we subscribe the events and start the connection as below: connection.Start().Wait(); What if I would like to establish a secure connection between the client and server. How can we achieve that with current features? I noticed that there is a property type of System.Net.ICredentials on HubConnection class. Is this the way for this? If so, how should

Using SignalR with Azure Table Storage - What architecture?

空扰寡人 提交于 2019-12-31 17:57:21
问题 I have a smart grid system where multiple hardware devices are sending raw sensor data to an Azure Queue. Each device sends a single data packet once every minute. Multiple Worker Roles process the data packets on the queue and push the data to Table Storage. I have a Web Role which holds the application for users to view their device data and a host of other alerts and messages relating to their smart energy system. At the moment the web application just uses ajax polling at one minute

OWIN + SignalR + Autofac

雨燕双飞 提交于 2019-12-31 09:47:10
问题 Taken from: http://docs.autofac.org/en/latest/integration/signalr.html: "A common error in OWIN integration is use of the GlobalHost. In OWIN you create the configuration from scratch. You should not reference GlobalHost anywhere when using the OWIN integration." That sounds reasonable. However, how should one resolve IHubContext from an ApiController, like the usual (non-OWIN): GlobalHost.ConnectionManager.GetHubContext<MyHub>() ? I can't find a reference on this one anywhere, and the only

WebRTC and Asp.NetCore

喜夏-厌秋 提交于 2019-12-31 09:07:44
问题 I would like to record the Audio stream from my Angular Web App to my Asp.net Core Api. I think, using SignalR and its websockets it a good way to do that. With this typescript code, I m able to get a MediaStream: import { HubConnection } from '@aspnet/signalr'; [...] private stream: MediaStream; private connection: webkitRTCPeerConnection; @ViewChild('video') video; [...] navigator.mediaDevices.getUserMedia({ audio: true }) .then(stream => { console.trace('Received local stream'); this.video

How to use signalr in android Service

江枫思渺然 提交于 2019-12-31 03:32:09
问题 I used the signalr library and the problem that is created for me is that when the phone goes to sleep it will issue a connection time out error and will no longer connect to the server. in Activity public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); startService(new Intent(getApplicationContext(), signalRService.class)); }} in Service public class SignalRService extends Service { private

EnableAutoRejoiningGroups disappeared in SignalR 1.0

守給你的承諾、 提交于 2019-12-31 02:58:26
问题 Looks like GlobalHost.HubPipeline.EnableAutoRejoiningGroups() has disappeared in 1.0 final release of SignalR. However there is no mention of where it went in the release notes and no clue how to get this functionality back. Anybody knows what happened? 回答1: Found comment in the source tree: EnableAutoRejoining has been removed from HubPipeline. This feature is turned on by default. 来源: https://stackoverflow.com/questions/14967575/enableautorejoininggroups-disappeared-in-signalr-1-0

Debugging SignalR hang

ぐ巨炮叔叔 提交于 2019-12-31 01:58:05
问题 Windows 7, SignalR2. I have some HelloWorld SignalR code that works in one VS2013 project (Ie, my SignalR hello world playground). When I add the same code to an existing application, SignalR threads "hang" in IIS "forever". This happens every single time. My SignalR console looks like: My perfMon counters look like this: My worker process list looks like: I'm after some tips on where to start debugging. In Java, I would take a thread dump and I could see what is going on fairly easily. These

SignalR won't use Websocket protocol even though I have the protocol installed in windows 8

人盡茶涼 提交于 2019-12-30 21:11:07
问题 I'm using signalr to do some real-time events in my web application. I'm trying to force signalr to use the new websocket protocol but it won't, even if I specify it. $.connection.hub.start({ transport: 'webSockets' }) I definitely have the web socket protocol installed and I am running Windows 8 with IIS 8. What else do I need to do to enable web sockets support in signalr? 回答1: Ensure that your app is using the .NET 4.5 assembly from the SignalR package. If the project is targeting 4.0, or