Keep it Simple

// practice, the distance between dream and achievement

Tag: SignalR (page 1 of 2)

SignalR – Mapping SignalR Users to Connections using IUserIdProvider

SignalR provides ConnectionId for each connection. To find which connection belongs to whom (the user), we need to create a mapping between the connection and the user. This depends on how you identify a user in your application.

In SignalR 2.0, this is done by using the inbuilt IPrincipal.Identity.Name, which is the logged in user identifier as set during the ASP.NET authentication.

Continue reading

SignalR – Load Test – SignalR hub based application?

The SignalR codebase includes a load-testing tool called Crank. However Crank can only test PersistenConnections but since you’re looking to test the SignalR Hub itself, you can use the sample tool provided by qburst.

The source code for this tool can be downloaded from here and this article should help you further.

SignalR – So what is JSONP?

As you may be aware you cannot directly load data files from another domain. This is a security issue that has been around for a long time and is commonly solved by sharing data through an API, REST or such.However there are ways around this and in this post we will be looking into JSONP.

JSONP is nothing but a Javascript function call returned from the remote server.

Continue reading

SignalR – So what is CORS?

To prevent websites from tampering with each other, web browsers implement a security measure known as the same-origin policy. The same-origin policy let’s resources (such as JavaScript) interact with resources from the same domain(combination of protocol + hostname + port – Eg: & are different domains), but not with resources from a different domain. This provides security for the user by preventing abuse, such as running a script that reads the password field on a secure website.

In cases where cross-domain scripting is desired, CORS allows web developers to work around the same-origin policy. CORS adds HTTP headers which instruct web browsers on how to use and manage cross-domain content. The browser then allows or denies access to the content based on its security configuration.

Continue reading

Older posts

© 2018 Keep it Simple

Theme by Anders NorenUp ↑