1
I’m trying somehow to pass parameter to actionfilter.
Please follow the code:
Controller:
[LogActionFilter(IsAuthenticated = Request.IsAuthenticated)]
//Tentativa 1 System.Web.HttpContext.Current.Request.IsAuthenticated
Actionfilter:
public class LogActionFilter : ActionFilterAttribute
{
public string IsAuthenticated { get; set; }
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
etc...
I get that mistake:
An Object Reference is required for the non-static field, method, or Property 'Controller.Httpcontext'
Solved problem here, thanks @Pablo Tondolo de Vargas
– Matheus Miranda