Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using Owin;
namespace Sitecore.SignalR.Pipelines.InitializeOwinMiddleware
{
using Microsoft.AspNet.SignalR;
using Sitecore.Diagnostics;
using Sitecore.Owin.Pipelines.Initialize;
using Sitecore.SignalR.Configuration;
public class InitializeSignalR : InitializeProcessor
{
public override void Process([NotNull] InitializeArgs args)
{
Assert.ArgumentNotNull(args, nameof(args));
var connection = System.Configuration.ConfigurationManager.ConnectionStrings["myConnection"].ConnectionString;
GlobalHost.HubPipeline.RequireAuthentication();
GlobalHost.DependencyResolver.UseSqlServer(connection);
args.App.MapSignalR(Settings.SignalR.Path, new HubConfiguration());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment