0
goldstar25 created
Hi,How to add custom mvc filter in AbpModule by ASP.NET Core?There has no method look this:
private static void AddFilters(MvcOptions options)
{
options.Filters.AddService(typeof(AbpAuthorizationFilter));
options.Filters.AddService(typeof(AbpAuditActionFilter));
options.Filters.AddService(typeof(AbpValidationActionFilter));
options.Filters.AddService(typeof(AbpUowActionFilter));
options.Filters.AddService(typeof(AbpExceptionFilter));
options.Filters.AddService(typeof(AbpResultFilter));
}
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
3 Answer(s)
-
0
Hi,
You can do it in ConfigureServices method of Startup.cs. Include it like this:
services.AddMvc(options => { ........ options.Filters.Add(typeof(AbpAuthorizationFilter)); ........ });Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
But,How to set it in AbpModuleās PreInitialize methond?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I give up this way,I had to override the OnActionExecuting method inside the controller .
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)