是否有一种方法可以在具有Authorize属性的控制器类中的一个操作中忽略[授权] attibute?
[Authorize] public class MyController : Controller { [Authorize(Users="?")]//I tried to do that and with "*",but unsuccessfuly,public ActionResult PublicMethod() { //some code } public ActionResult PrivateMethod() { //some code } }
只有PrivateMethod()应该需要验证,但它也是必需的.
PS:我不想让我的自定义授权过滤器.
[]的