public CommonJobsApplication() { EndRequest += (sender, args) => { var error = HttpContext.Current.Server.GetLastError(); if (error != null) { log.ErrorException("Uncatched exception", error); try { LogManager.Flush(1000); } catch { //What can I do? } } RavenSessionManager.CloseCurrentSession(error != null); }; lock (block) { if (!initialized) { Initialize(); } } }
private void InitializeDocumentStore() { RavenSessionManager.InitializeDocumentStore(GetIndexAssemblies(), GetConnectionStringName(), GetConnectionErrorUrl()); global::Raven.Client.MvcIntegration.RavenProfiler.InitializeFor(RavenSessionManager.DocumentStore); RegisterListeners(); }
protected override void OnAuthorization(AuthorizationContext filterContext) { RavenSession = RavenSessionManager.GetCurrentSession(); base.OnAuthorization(filterContext); }