1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| //// 參考Nuget Microsoft.AspNet.SignalR Microsoft.AspNet.SignalR.Core Microsoft.AspNet.SignalR.StackExchangeRedis Microsoft.AspNet.SignalR.SystemWeb Microsoft.Owin
//// Startup.cs [assembly: Microsoft.Owin.OwinStartupAttribute(typeof(RedisScaleOut.Startup))] namespace RedisScaleOut { using Microsoft.AspNet.SignalR; using Owin;
public partial class Startup { public void Configuration(IAppBuilder app) { GlobalHost.DependencyResolver.UseStackExchangeRedis(new RedisScaleoutConfiguration("redisConn", "redisAffixKey"));
app.MapSignalR(); } } }
|