protected void Application_Start(object sender, EventArgs e) { string ls_hosts, ls_port; ls_hosts = GyRedis.GyRedis.RedisHost; ls_port = GyRedis.GyRedis.RedisPort.ToString(); this.clientManager = new ServiceStack.Redis.PooledRedisClientManager(ls_hosts + ":" + ls_port); Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider.SetClientManager(this.clientManager); Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider.SetOptions(new Harbour.RedisSessionStateStore.RedisSessionStateStoreOptions() { KeySeparator = ":", OnDistributedLockNotAcquired = sessionId => { baseclass.Log.WriteTextLog("Application_Start", "Error", "Session could not establish distributed lock. " + "This most likely means you have to increase the " + "DistributedLockAcquireSeconds/DistributedLockTimeoutSeconds."); } }); }
public IsoSynchronizationManager(IServerEvents sse, ServiceStack.Redis.IRedisClientsManager clientsManager) { serverEvents = sse; redisManager = clientsManager; }