action-filter
Response.Redirect not working inside an custom ActionFilter
My code is the following public class SessionCheckAttribute : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext filterContext)[详细]
2022-12-29 06:20 分类:问答How do the httppost, httpput etc attributes in ASP.NET MVC 2 work?
In ASP.NET MVC 2, a couple of new action filter attributes were introduced, as \"shorthand\" for attributes in ASP.NET MVC 1; for example, app开发者_开发问答lying the HttpPostAttribute does the same t[详细]
2022-12-27 14:54 分类:问答How do I test ActionFilterAttributes that work with ModelState?
As suggested by (among others) Kazi Manzur Rashid in this blog post, I am using ActionFilterAttributes to transfer model state from one request to another when redirecting.[详细]
2022-12-26 03:19 分类:问答What is the order of execution in ASP.NET MVC Controller?
Say I have a controller called \"HomeController\" which inherits from Mvc.Controller. Also say I have written the constructor of the controller and some filters for some actions.[详细]
2022-12-24 06:38 分类:问答Model availability inside ActionFilter
I have created a new ActionFilter for an ASP.NET MVC application that I\'m creating. I have an action which accepts an Http Post and the argument of the action method accepts an object, for which I ha[详细]
2022-12-22 18:32 分类:问答Redirect loop with SSL action filter in ASP.NET MVC
I am using an ActionFilter (see below) to detect whe开发者_高级运维ther or not 1. the current controller/action requires SSL and 2. SSL is currently being used, and redirect accordingly.[详细]
2022-12-21 14:34 分类:问答Modify a model in an ActionFilter
I have an actionfilter that I am running OnActionExecuting in ASP.NET MVC 2. Essentially I would like the actionfilter to sanitize my data and replace the current model (which will be passed to subseq[详细]
2022-12-16 16:07 分类:问答Changing ActionExecutingContext values in Custom Filter Attribute
I have a custom filter attribute that I want to use on certain ActionResults to look at the data being attempted a开发者_如何学Cnd to set values where certain rules are violated.[详细]
2022-12-16 00:54 分类:问答Catching ASP.Net MVC Principle Permission attribute exceptions
I would like to secure my MVC controller actions using... [PrincipalPermission(SecurityAction.Demand, Role=\"Administrator\")][详细]
2022-12-15 19:46 分类:问答Flushing and Compression filters (ASP.NET MVC)
We have quite common code which worked fine: public class CompressionFilterAttribute : ActionFilterAttribute[详细]
2022-12-15 02:11 分类:问答