I have a problem with the following code. I tried to implement a custom action filter with dependency injection to my constructor. I followed the exa ...
I have a problem with the following code. I tried to implement a custom action filter with dependency injection to my constructor. I followed the exa ...
I need access to RequestBody inside OnActionExecuting or OnActionExecuted filter, but I can not found concrete example how to use PipeReader to read f ...
I understand that there is a concept of Action Filters in languages like C# using ASP.NET. I would like to have this kind of pre-processing functional ...
I've created a custom attribute that will be used throughout multiple actions. I need to take parameter from the action where attribute is used and pa ...
I'm following this tutorial on Linkedin Tutorial , and in this video the presenter shows how to use ActionFilter , however , when I execute this appli ...
How can authentication be done in .NET Core as it was done using IAuthenticationFilter? I am a newbie with .NET Core and filters. I was trying to a ...
I have a custom action filter that takes in a property but I need the property to come from my appsettings.json file. I pass my configuration into the ...
I am working on a minimal API and I am trying to make an actionfilter for authentication works with it. I tried to add my action filter directly on t ...
I have a worksheet (let's call it Worksheet A) with a line graph that tracks payments for products over time with Year / Quarter as the X axis. There ...
I have an action filter like this: And I put attribute on controller like this (I know for sake of this purpose you need to use IFilterFactory or S ...
I'm not familiar with ASP.NET Core actions' custom filter attribute. I need to redirect to another action in case some data does not exist using a cus ...
We have an Identity Server 4 to authorize users and custom authorization in API project. I want to set both of these authorizations together, but fir ...
Trying to add an authentication filter to an ASP.NET Core 5 MVC action method and pass a parameter. However I'm unable to find a way to do this. This ...
I have a ActionFilter.cs which throws exception in OnActionExecuting method as follows I also have Global Exception Handler as ExceptionFilter.cs ...
How can I Log HTTP requests and responses inside OnActionExecutionAsync? ...
I have the following asp.net WebApi2 route using .NET 4.6 that illustrates the problem I am having: With the following model: I am trying to all ...
I've created a service that's used throughout my aspnet project that retrieves and validates a header among other things. Issue is that the Exception ...
I have an AJAX call for a DataTable that is calling a method in my controller with a return type of JsonResult. If the user's session has expired, I g ...
I had the situation where I wanted to do query parameter (not form parameter) xss handling* for all of my MVC flows (and hence ActionFilter was ideal) ...
I'm trying to write an action or result filter that automatically does something if the status code is >= 400. The ActionExecutedContext.Result pro ...