ASP.NET MVC 5 And Web API 2 .NET requirement

2019-06-21 18:04发布

问题:

My host provider only supports .NET 4. Is it possible to run MVC 5 and Web API 2 in .NET 4 machine?

回答1:

Short Answer: No, you need .NET 4.5

Only if you add the dependencies:

  • Razor v3.0+
  • ASP.NET WebPages v3.0+


回答2:

No, ASP.NET Web API 2 requires .NET 4.5: http://forums.asp.net/t/1937143.aspx?Is+ASP+NET+MVC+5+and+Web+API+2+0+supported+on+NET+4+0+and+IIS6+ (scroll at the very bottom)