Tuesday, January 28, 2014

How to create AllowAnonymous Attribute in ASP.NET MVC 3?

There is one in ASP.NET MVC 4, but not in MVC 3.
    [AttributeUsage(AttributeTargets.Class |
AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
    public sealed class AllowAnonymousAttribute : Attribute
    {
    }