c# - Allowanonymous 属性在 asp.net mvc 中不起作用

标签 c# asp.net-mvc-4 authentication authorization

我正在使用 Web API Controller 构建 Web 服务。但是,当我尝试使用 [allowanonymous] 属性装饰我的任何操作时,它不起作用......这是一张图片

enter image description here

我只是想知道这里出了什么问题......

最佳答案

只需完全限定名称

[System.Web.Mvc.AllowAnonymous]
public ActionResult SomeAction()
{ ...

关于c# - Allowanonymous 属性在 asp.net mvc 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31904473/

相关文章:

Python Selenium : Can't find the login element of costar. com

c# - Miniprofiler 在缺少 CreatedOn 列时中断

c# - 响应式(Reactive)扩展中的递归/扇出

c# - sql server 中 System.Version 的数据类型

c# - MVC Controller 返回一个错误的请求?

javascript - 如何通过jquery设置select2的单选下拉默认值

c# - 正在解析的 MVC 4 详细信息页面 2 个 id

algorithm - 安全的用户身份验证

c# - 具有泛型的结构图配置

node.js - 使用 react-devtools 破解身份验证