使用ASP.NET Web API构造基于restful风格web services,IHttpActionResult是一个很好的http结果返回接口。
然而发现在vs2012开发环境中,System.Web.Http包I中不含有HttpActionResult,这时需更新ASP.NET Web API。ASP.NET Web API是NuGet项目来管理更新,微软不提供安装包。所以使用NuGet更新包,具体步骤如下:

1. 打开NuGet,打开方法 工具->库程序包管理器->程序包管理器控制台,如下图所示:vs2012 IHttpActionResult NotFund Ok

vs2012 IHttpActionResult NotFund Ok
2. 输入如下命令Install-Package Microsoft.AspNet.WebApi 更新web Api,如下图所示:
vs2012 IHttpActionResult NotFund Ok
更新完成,IHttpActionResult可识别。

相关文章:

  • 2021-04-07
  • 2021-12-19
  • 2021-10-11
  • 2021-12-10
  • 2021-12-04
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-15
  • 2022-02-01
  • 2021-08-01
  • 2021-10-11
  • 2022-12-23
相关资源
相似解决方案