ActionFilterAttribute OnActionExecuting 获取参数

    public class AuthFilterAttribute : ActionFilterAttribute
{
/// <summary>
/// Action执行前处理
/// </summary>
/// <param name="actionContext"></param>
public override void OnActionExecuting(HttpActionContext actionContext)
{
HttpContextBase context = (HttpContextBase)actionContext.Request.Properties["MS_HttpContext"];//获取传统context
HttpRequestBase request = context.Request;//定义传统request对象
string name = request.Params["name"]; base.OnActionExecuting(actionContext);
} }
上一篇:系统日志和内核消息 $ dmesg$ less /var/log/messages$ less /var/log/secure$ less /var/log/auth


下一篇:Linux /var/log下的各种日志文件详解