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.
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2016-04-01 SuperSocketClientEngine
2015-04-01 .NET_Framework_version_history
2015-04-01 Tuple元祖