action-filter
Cannot access local var in action filter: object does not contain a definition for error
Noob to MVC question!Consider t开发者_运维技巧he following I\'m using for an action filter public override void OnResultExecuting(ResultExecutingContext filterContext)[详细]
2023-02-09 12:09 分类:问答BeginRequest-like filter in MVC 3?
I have some code in my application that I need to execute on every request, before anything else executes (even before authentication). So far I\'ve been using the Application_BeginRequest event开发者[详细]
2023-02-08 09:05 分类:问答ASP.NET MVC - Easy way to temporarily require authorisation for whole site except one page
I am building a site with a mixture of public and member-only pages.The login system works fine as it is.[详细]
2023-02-05 14:34 分类:问答How do I set ExceptionHandled on an ActionExecutedContext
I\'m using an ActionFilter (that I did not write) on an action method. The action method itself calls a SaveOrUpdate() method on a repository. If that SaveOrUpdate() method fails with an exception I w[详细]
2023-02-05 10:30 分类:问答A way to exclude action filters in ASP.NET MVC?
I\'ve run into several cases in ASP.NET MVC where I wanted to apply an action filter on every action except one or two.For example, say you have an AccountController.Every action in it requires the us[详细]
2023-02-04 07:19 分类:问答Pass a non static value to a actionfilter
Is ther any way to pass a non static value to a actionfilter parameter like below? public class ProcuctController : Controller[详细]
2023-02-03 13:53 分类:问答MVC 3 compression filter causing garbled output
So, I have a custom attribute called CompressAttribute which is set up as a global filter in global.asax. It uses reflection to examine the return type of the current action method and if it is \"View[详细]
2023-02-02 00:56 分类:问答How to I replace URLs in rendered HTML using an ASP.NET MVC ActionFilter
I\'m trying to create an ActionFilter to replace some text in my HTML. Basically when the server is using SSL I want to replace references to my CDN (http://cdn.e开发者_如何学编程xample.com) with refe[详细]
2023-01-29 23:28 分类:问答How to pass parameters to a custom ActionFilter in ASP.NET MVC 2?
I\'m trying to create a custom ActionFilter which operates on a set of parameters that would be passed to it from the controller.[详细]
2023-01-28 01:05 分类:问答ASP.NET MVC action filters: Setting the filterContext.Result in a filter prevents other filters from being executed?
I currently have 2 filters, Auth and Redirect that do the following: Filter Auth, who implements IAuthorizationFilter and ActionFilter, checks for user login and authorization, and if that fails sets[详细]
2023-01-22 21:29 分类:问答