Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
MVC Action Filters 使用传递给 ActionResult 的参数?
我创建了一个自定义动作过滤器 http www asp net mvc tutorials older versions controllers and routing understanding action filters cs没有问题
c
ASPNETMVC
actionfilter
actionfilterattribute
Action Filter 中的 UnitOfWork 似乎正在缓存
我有一个使用 IoC Unity 的 MVC 3 站点 我的模型是使用 EF4 和 POCO 生成的 我正在使用操作过滤器来提交我的工作单元 public class UseUnitOfWorkAttribute ActionFilterA
ASPNETMVC
caching
inversionofcontrol
UnitOfWork
actionfilter
Asp.net Web API - 从actionfilter返回数据
我想从 Web api 操作过滤器返回一个 json 对象 我怎样才能实现这个目标 我可以从操作返回对象 但我需要在某些条件下从操作过滤器返回一些数据 提前致谢 编辑 1 当我更改如下代码时 浏览器仍在加载而没有任何响应 并以超时错误结束
c
aspnetwebapi
actionfilter
动态启用/禁用 mvc 服务器端验证
我有一个 mvc 表单multiple提交按钮 保存草稿 和 发布 目的是在单击 保存草稿 按钮并提交表单时跳过客户端 javascript 无阻碍 验证和服务器端验证 但如果单击 发布 按钮 我确实需要触发这两个验证 我的研究让我找到了一
jQuery
validation
modelviewcontroller
dataannotations
actionfilter
Ninject 和 MVC3 控制器和操作上的依赖注入操作过滤器存在问题
最近 我决定删除控制器中的一堆操作级别过滤器 并用单个控制器级别过滤器替换它们 现在我收到此错误消息 Error activating LogActionFilter More than one matching bindings are
aspnetmvc3
ninject
actionfilter
ninjectwebmvc
MVC 3 中如何处理会话超时
我遇到了频繁的会话超时问题 我想编写一个可以在每个控制器上使用的通用过滤器 过滤器应该重定向用户登录 并在登录后返回到用户发送最后一个请求的位置 你可以尝试这样的事情 public class SessionExpireAttribute
ASPNETMVC
sessiontimeout
actionfilter
用于包装 JsonResult 操作响应的 .Net 过滤器
我已经建立了一个网络 API 应用程序并发现了一个问题 目前在我的代码中处理得不好 该问题总结为包装所有内容Json从具有自定义节点 根 的所有 API 操作返回的对象 即 我有这个 json 数组 响应 Category Pages Us
c
aspnet
ASPNETMVC
aspnetwebapi
actionfilter
ActionFilter 和 ResultFilter 的不同和示例
我无法理解 ActionFilter 和 ResultFilter 之间的区别 执行OnActionExecuted方法后的ResultFilter 您能否解释一下 ActionFilter 和 ResultFilter 的主要区别和示例
ASPNETMVC
actionfilter
actionfilterattribute
ASP.NET MVC 2 中的 httppost、httpput 等属性如何工作?
在 ASP NET MVC 2 中 引入了一些新的操作筛选器属性 作为 ASP NET MVC 1 中属性的 简写 例如 应用HttpPostAttribute与申请做同样的事情 AcceptVerbs HttpVerbs Post 到一个
c
aspnetmvc2
actionfilter
httpmethod
如何从 FilterAttribute 中获取当前 Url?
我正在编写一个授权过滤器属性 但我无法弄清楚如何以字符串形式获取当前 url 以便我可以将其作为参数传递给 LogOn 操作 目标是 如果用户成功登录 他们将被重定向到他们最初尝试访问的页面 public override void OnA
ASPNETMVC
URL
Authorization
actionfilter
actionfilterattribute
Web api 中多个过滤器的执行顺序
我正在使用最新的web api 我做注释some具有 3 种不同过滤器属性的控制器 1 Authorize 2 RessourceOwnerAttribute derived from AuthorizationFilterAttribut
c
aspnet
aspnetwebapi
actionfilter
aspnetwebapi2
ExceptionFilter 不运行 .NET Core Web Api
我的操作过滤器有问题 我的过滤器都没有运行 我正在使用 NET Core 2 2 并构建 Web Api 我在控制器中使用 CustomExceptionFilter 注册了它 HttpDelete id CustomExceptionFi
c
NET
NetCore
actionfilter
customactionfilter
MVC 4 全局过滤器的执行顺序是什么
我的 MVC 4 应用程序中有 2 个全局操作过滤器 我已使用 RegisterGlobalFilters 在 Filter config 文件中注册了它们 我需要它们以特定的顺序执行 我知道如何指定控制器特定过滤器的顺序 但如何指定全局过
aspnetmvc4
actionfilter
在 BaseController 的 OnActionExecuting 之前调用 FilterAttribute 的 OnActionExecuting
我有一个BaseController我在其中放入了一些数据ViewData通过覆盖进行收集OnActionExecuting 现在我有一个动作ChildController不需要该视图数据 为此我创建了一个DontPopulateViewD
ASPNETMVC
actionfilter
ASP.NET MVC ActionFilter - 确定是否是 AJAX 请求
我使用 ActionFilter 来确定用户在执行操作之前是否有权访问特定资源 例如帐户对象 la Rhino Security 这是一个全局过滤器 如果授权值失败 它会重定向到错误页面 我正在使用以下代码 它适用于整页请求 filterC
aspnetmvc3
actionfilter
过滤器可以访问我的 BaseController 中的属性吗?
我有一个基本控制器 其属性如下 public class BaseController Controller public User CurrentUser get set protected override void OnActionE
c
ASPNETMVC
actionfilter
ASP.NET MVC:动作过滤器设置控制器变量?
我有一个场景 对于每个页面请求 我都必须检查会话是否存在特定 ID 如果发现这一点 我必须从数据库中获取相关对象并将其提供给控制器 如果找不到会话 ID 我需要重定向用户 会话已过期 目前 我有一个自定义代码块 几行 它在控制器内的每个操作
aspnet
ASPNETMVC
actionfilter
MVC中属性和过滤器有什么区别
现在我可以进行比较而不仅仅是定义吗 Example SomeClassAttribute or ISomeClassAttribute VS SomeClassFilter or ISomeClassFilter 我有一种感觉 它们可以以相
c
ASPNETMVC
aspnetmvc4
aspnetwebapi
actionfilter
使用 Spring.Net 将依赖项注入 ASP.NET MVC ActionFilters
我正在使用 MvcContrib 进行 Spring Net ASP Net MVC 控制器依赖项注入 我的依赖项没有被注入到我的 CustomAttribute 操作过滤器中 如何将我的依赖项放入其中 假设您有一个 ActionFilte
aspnet
ASPNETMVC
SpringNet
mvccontrib
actionfilter
IAuthenticationFilter 中的 ActionContext.ActionArguments 为空
背景 我想使用以下实现来验证对我的 Web API 的 POST 请求IAuthenticationFilter使用 Ninject 注入 为了验证请求 我需要访问请求正文 Problem ActionContext ActionArgum
c
aspnet
authentication
aspnetwebapi2
actionfilter
1
2
»