What are the differences between WebAPI and WebAPI 2
http://stackoverflow.com/questions/21298961/what-are-the-differences-between-webapi-and-webapi-2
Major new features are,
1. AttributeRouting
2. OWIN self host
3. IHttpActionResult
4. CORS
5. HttpRequestContext
I had the same question and found simple article about this, here.
In addition to the features mentioned by iJay
Testability
ODATA Improvements
Filter Overrides
ByteRangeStreamContent
We can differentiate web api and web api2 by using above features.
How to check the asp.net web api version in project?
https://forums.asp.net/t/2102345.aspx?How+to+know+the+web+api+project+version+
You should be able to check and see if you have a Web API Nuget package within your project, which should give you an idea of the version being used, v4.x will indicate Web API 1 and v5.x will indicate Web API 2 :
IIRC, Web API 2 was released to coincide with the release of Visual Studio 2013, so it should be available / installed on there.
https://stackoverflow.com/questions/30330865/how-do-you-know-the-web-api-version-of-your-project
By default a MVC 4.0 template ships with version 4.0.20710.0 of WebAPI (aka Web api 1). To check this, open your solution, exapnd the webapi solution, then open the packages.config file that holds the nuget config for what you have installed. If you have not updated the packages you should see this.
<package id="Microsoft.AspNet.WebApi" version="4.0.20710.0" targetFramework="net40" />
You can now go to the nuget website and examine the package history here. I have copied the contents of this page below. As you can see this version of web api was release on 11th Aug 2012. This version was better known as "web api 1" after Web API 2 was release around Jan 2014. You can upgrade you MVC4 project to use Web API 2 if you wish by using the nuget update wizard.
最新文章
- JQuery表格插件DataTables 当前页合计功能
- SQLite -- 分页查询
- three.js 源码注释(四十四)Light/DirectionalLight.js
- Intellij Idea无法从Controller跳转到视图页面的解决方案
- Kali Linux 2016.2初体验使用总结
- Partran,Nastran和ANSYS的区别
- Scrum Meeting---Seven(2015-11-2)
- java多线程之:SynchronousQueue队列
- LintCode ";Count of Smaller Number before itself";
- #Leet Code# Root to leaf
- 基于jsp+servlet图书管理系统之后台用户信息删除操作
- Android.mk编译APK范例
- Storm官方文档翻译之创建Storm项目
- JVM 指令
- jQuery的学习笔记2
- [Swift]LeetCode203. 移除链表元素 | Remove Linked List Elements
- 作业20171116 beta2及beta发布 成绩
- springboot添加fluent日志记录
- linux physical and virtual addressing modes
- mongodb 日志清理
热门文章
- Docker可视化管理工具对比(DockerUI、Shipyard、Rancher、Portainer)
- ASP.NET-未解决的问题
- ASP.NET-常用插件集合
- 学一下HDFS,很不错(大数据技术原理及应用)
- POJ 2296 Map Labeler(2-sat)
- 17、lambda表达式
- codeforces Looksery Cup 2015 H Degenerate Matrix 二分 注意浮点数陷阱
- C++语言笔记系列之十八——虚函数(1)
- nyoj--914--Yougth的最大化(二分查找)
- [JZOJ 5885] [NOIP2018模拟9.27] 物理实验 解题报告 (思维)