protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) { StaticConfiguration.DisableErrorTraces = true; base.ApplicationStartup(container, pipelines); Elmahlogging.Enable(pipelines, "elmah"); pipelines.EnableNewRelicLogging(); }
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) { base.ApplicationStartup(container, pipelines); Elmahlogging.Enable(pipelines, "elmah"); // TODO: the below line increses the maximum json payload size // to an obscenely high value (which will not ever be hit). // This is to prevent "Nancy.Json.JsonSettings.MaxJsonLength exceeded" exceptions. JsonSettings.MaxJsonLength = int.MaxValue; }
protected override void ApplicationStartup(ILifetimeScope container, IPipelines pipelines) { base.ApplicationStartup(container, pipelines); ClientAppSettings.Enable(pipelines); Elmahlogging.Enable(pipelines, "elmah"); CustomErrors.Enable(pipelines, new ErrorHandlingConfiguration()); FormsAuthentication.Enable(pipelines, new FormsAuthenticationConfiguration { RedirectUrl = "~/login", UserMapper = container.Resolve <IUserMapper>() }); }
// The bootstrapper enables you to reconfigure the composition of the framework, // by overriding the various methods and properties. // For more information https://github.com/NancyFx/Nancy/wiki/Bootstrapper protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) { pipelines.OnError.AddItemToEndOfPipeline((ctx, exception) => { exception.LogToElmah(); return(null); }); var errorLog = Elmah.ErrorLog.GetDefault(null); errorLog.ApplicationName = "/LM/W3SVC/2/ROOT/NancyApi.SelfHost"; base.ApplicationStartup(container, pipelines); Elmahlogging.Enable(pipelines, "elmah", new string[0], new[] { HttpStatusCode.NotFound, HttpStatusCode.InsufficientStorage }); }
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) { base.ApplicationStartup(container, pipelines); Elmahlogging.Enable(pipelines, "elmah"); JsonSettings.RetainCasing = true; JsonSettings.MaxJsonLength = int.MaxValue; StaticConfiguration.DisableErrorTraces = false; FormsAuthentication.Enable(pipelines, new FormsAuthenticationConfiguration { RedirectUrl = container.Resolve <IAuthenticationRedirectUrl>().GetUrl, UserMapper = container.Resolve <IUserMapper>() }); }
protected override void ApplicationStartup(TinyIoc.TinyIoCContainer container, Nancy.Bootstrapper.IPipelines pipelines) { base.ApplicationStartup(container, pipelines); Elmahlogging.Enable(pipelines, "admin/elmah"); }
protected override void ApplicationStartup(Nancy.TinyIoc.TinyIoCContainer container, Nancy.Bootstrapper.IPipelines pipelines) { base.ApplicationStartup(container, pipelines); Elmahlogging.Enable(pipelines, "elmah", new string[0], new[] { HttpStatusCode.NotFound, HttpStatusCode.InsufficientStorage }); }
protected override void ApplicationStartup(TinyIoc.TinyIoCContainer container, Nancy.Bootstrapper.IPipelines pipelines) { base.ApplicationStartup(container, pipelines); Elmahlogging.Enable(pipelines, "admin/elmah", new string[0], new HttpStatusCode[] { HttpStatusCode.NotFound }); }