且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

' AllowAnonymous'找不到

更新时间:2021-12-30 21:51:28

可能您的项目中缺少对 System.Web.Http 程序集的引用?

Probably you are missing the reference to System.Web.Http assembly in your project?

所以您需要:

  • 将引用添加到 System.Web.Http ;
  • 使用System.Web.Http;将添加到您的控制器中;

要添加参考,您需要执行以下步骤:

To add Reference you need to do next steps:

  • Solution Explorer 中,右键单击项目节点,然后单击添加.参考.
  • 添加引用"对话框中,选择程序集"标签,然后在右侧的搜索中输入 System.Web.Http .
  • 选择组件 System.Web.Http ,然后单击确定".
  • In Solution Explorer, right-click the project node and click Add Reference.
  • In the Add Reference dialog box, select the tab Assemblies, and enter System.Web.Http into search on the right side.
  • Select the component System.Web.Http, and then click OK.

链接:

如何:使用添加引用"对话框添加或删除引用框