public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new System.Web.Mvc.AuthorizeAttribute()); filters.Add(new RequireHttpsAttribute()); filters.Add(new cpl_azure.App_Start.SSLRedirector()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new DefaultValFilterAttribute());//自动加默认值过滤 filters.Add(new MyResultFillters());//自定义返回过滤 filters.Add(new MyExceptionFilter());//自定义异常过滤 filters.Add(new HandleErrorAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); // Enforce HTTPS protocol filters.Add(new RequireHttpsAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); #if !DEBUG filters.Add(new RequireHttpsAttribute()); #endif }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute{Order=1}); filters.Add(new HandleErrorAttribute{Order=2,ExceptionType=typeof(InvalidTokenException), View="Refresh"}); filters.Add(new TokenExtractingFilter()); filters.Add(new TokenPersistenceFilter()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); //使得Simplemembership可以使用 WebSecurity、Role等等和使用者登陸系統相關。 filters.Add(new InitializeSimpleMembershipAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new RequireAuthenticationFilterAttribute()); filters.Add(new CompressFilterAttribute()); filters.Add(new CacheFilterAttribute()); filters.Add(new HandleErrorAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new InitializeSimpleMembershipAttribute()); filters.Add(new AllowCrossSiteJsonAttribute()); filters.Add(new ExceptionFilterAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new ExceptionFilter()); filters.Add(new ValidateInputAttribute(false)); filters.Add(new LoginFitler()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new ErrorFilterAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { //filters.Add(new HandleErrorAttribute()); filters.Add(new CookieAuthenticationFilter()); filters.Add(new LegacyUrlFilter()); filters.Add(new HttpContentNegotiationFilter()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new AuthorizeAttribute()); //filters.Add(new CheckSessionOutAttribute()); //filters.Add(new EmplSessionExpireFilterAttribute()); }
/// <summary> /// Registers the global filters. /// </summary> /// <param name="filters">The filters.</param> public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); //required for FluentSecurity filters.Add(new HandleSecurityAttribute(), 0); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); // for all requests filters.Add(new RequireHttpsAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new SettingsAuthorizeAttribute()); filters.Add(new ExportModelStateToTempData()); filters.Add(new RequestTimingFilter()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new NoCacheFilterAttribute()); filters.Add(new SingleLoginFilterAttribute()); filters.Add(new FixModelFilterAttribute()); filters.Add(new HandleErrorAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); var slackReport = new WebHookErrorReportFilter( new WebHookOptions(ConfigurationManager.AppSettings["slack:webhookurl"]) { ChannelName = ConfigurationManager.AppSettings["slack:channel"], //UserName = ConfigurationManager.AppSettings["slack:username"], //IconEmoji = ConfigurationManager.AppSettings["slack:iconEmoji"], //AttachmentColor = ConfigurationManager.AppSettings["slack:color"], //AttachmentTitle = ConfigurationManager.AppSettings["slack:title"], //AttachmentTitleLink = ConfigurationManager.AppSettings["slack:link"], //Text = ConfigurationManager.AppSettings["slack:text"], //ExceptionTextFormat = ConfigurationManager.AppSettings["slack:exceptionTextFormat"], } ) { IgnoreHandled = true, IgnoreExceptionTypes = new[] { typeof(System.ApplicationException) }, }; filters.Add(slackReport, 1); //var slackReportEvented = new WebHookErrorReportFilter(); //slackReportEvented.OnExceptionReporting += slackReportEvented_OnExceptionReporting; //filters.Add(slackReportEvented); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); // this filter injects Notifications into the IBaseModel filters.Add(new AdminFilter()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new GlobalViewModelFilter()); filters.Add(new SslRedirectFilter()); filters.Add(new InitialConfigurationFilter()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); #if !DEBUG filters.Add(new System.Web.Mvc.AuthorizeAttribute()); #endif }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { // sets the CurrentCulture and CurrentUICulture values from the language segment of the route values filters.Add(new LocalizationAttribute()); /* * NB: CustomErrors must be ON in web.config for these to work. * Only applies to 500 errors. * Needs to be registered in the Global.asax file: FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters). */ // http://community.codesmithtools.com/CodeSmith_Community/b/tdupont/archive/2011/03/01/error-handling-and-customerrors-and-mvc3-oh-my.aspx filters.Add(new HandleErrorAttribute { ExceptionType = typeof(HttpRequestValidationException), View = "~/views/shared/errors/httprequestvalidationexception.cshtml", Order = 1 }); filters.Add(new HandleErrorAttribute { ExceptionType = typeof(HttpAntiForgeryException), View = "~/views/shared/errors/httpantiforgeryexception.cshtml", Order = 1 }); // custom error attribute to log all errors filters.Add(new GlobalErrorAttribute()); // enables the default error page filters.Add(new HandleErrorAttribute { View = "~/views/shared/errors/error.cshtml" }); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); // Register our custom Filter filters.Add(new PutDataActionFilter()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); //Adds DateTime filters.Add(DependencyResolver.Current.GetService<DebugFilter>()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { // Lynicon install inserted these 2 lines filters.Add(new ProcessIncludesAttribute()); filters.Add(new ProcessHtmlAttribute()); filters.Add(new HandleErrorAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new VerboseActionFilterAttribute()); filters.Add(new VerboseAuthorizationFilterAttribute()); filters.Add(new VerboseExceptionFilterAttribute()); filters.Add(new VerboseResultFilterAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new AuthorizeAttribute()); filters.Add(new HandleErrorAttribute()); filters.Add(new NoCacheFilter()); filters.Add(new LoginValidate()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); // Change order and refresh the page, check what is type name displaying filters.Add(new EntityNotFoundExceptionFilterAttribute() { Order = 1 }); filters.Add(new InvalidParametersExceptionFilterAttribute() { Order = 2 }); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); // global claims authorize filter filters.Add(new ClaimsAuthorizeAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new AuthorizeAttribute()); //filters.Add(new RequireHttpsAttribute()); }
private static void SetupFilters(GlobalFilterCollection filters) { filters.Add(new HandlesErrorAttribute()); filters.Add(new ProfileActionAttribute()); filters.Add(new StackExchange.Profiling.Mvc.ProfilingActionFilter()); filters.Add(new TrackAuthenticationMetricsAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(DependencyResolver.Current.GetService <DebugFilter>()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); //با اضافه کردن این بخش جهت دسترسی به کلیه صفحات باید لوگ این کرد filters.Add(new AuthorizeAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new AutorizarAtributo()); //filters.Add(new HandleErrorAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters?.Add(new RequireHttpsAttribute()); filters?.Add(new HandleErrorAttribute()); filters?.Add(new AuthorizerAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new LogActionFilterAttribute()); filters.Add(new LogExceptionFilterAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new ValidateModelStateAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); // Hanterar fel som skickas av filtren filters.Add(new AuthorizeAttribute()); // Hanterar authorization för controllers och actions. }
/// <summary> /// Registers all global filters. /// </summary> /// <param name="filters">The current filter collection</param> private void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters?.Add(new HandleErrorAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new AuthorizeBaseAttribute()); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { filters.Add(new HandleErrorAttribute()); filters.Add(new ContextFilter(DependencyResolver.Current.GetService <IWebSecurityService>())); }
public static void RegisterGlobalFilters(GlobalFilterCollection filters) { //filters.Add(new HandleErrorAttribute()); filters.Add(new ErrorAttribute()); //filters.Add(new AuthenticationAttribute());//全局过滤器 }