I'm relatively new to the world of SignalR. I've got a couple of questions some of ya'll can possibly help me with.
My question sets are two fold. I've been looking at a chat example and there are a couple of things I'm trying understand.
This sample is built using SignalR 1.x libraries.
The code sample from the Global.asax.c file is as follows:
public class Global : System.Web.HttpApplication
private static RouteBase hubRoute;
protected void Application_Start(object sender, EventArgs e)
hubRoute = RouteTable.Routes.MapHubs();
protected void Application_BeginRequest(object sender, EventArgs e)
// Turn readonly sessions on for SignalR
private bool IsSignalRRequest(HttpContext context)
RouteData routeData = hubRoute.GetRouteData(new HttpContextWrapper(context));
// If the routeData isn't null then it's a SignalR request
return routeData != null;
Question 1) I'm not clear on the concept of SetSessionStateBehavior being set to ReadOnly. What is the effect of this and why would we do this in the SignalR instance?
Question 2) I've been currently tasked with moving our implementation from the SignalR 1.x to 2.x libraries. How would I replicate this functionality using the 2.x libraries?