Пример #1
0
 protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
 {
     StaticConfiguration.DisableErrorTraces = true;
     base.ApplicationStartup(container, pipelines);
     Elmahlogging.Enable(pipelines, "elmah");
     pipelines.EnableNewRelicLogging();
 }
Пример #2
0
        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;
        }
Пример #3
0
        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>()
            });
        }
Пример #4
0
        // 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 });
        }
Пример #5
0
        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>()
            });
        }
Пример #6
0
 protected override void ApplicationStartup(TinyIoc.TinyIoCContainer container, Nancy.Bootstrapper.IPipelines pipelines)
 {
     base.ApplicationStartup(container, pipelines);
     Elmahlogging.Enable(pipelines, "admin/elmah");
 }
Пример #7
0
 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 });
 }
Пример #8
0
 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 });
 }