Why is OnAuthorization called twice in my custom AuthorizationFilterAttribute?

Viewed 2630

Why is OnAuthorization called twice for my straight forward AuthorizationFilterAttribute?

public class ApiAuthenticateAttribute : AuthorizationFilterAttribute
{
   public void override OnAuthorization(System.Web.Http.Controllers.HttpActionContext actionContext)
    {
        if(NotAuthorized())
            throw new Exception();

    }
}

First Call Stack

First Call Stack

Second Call Stack

Second Call Stack

2 Answers
Related