85

What is the difference between ASP.NET Core Web (.NET Core) vs ASP.NET Core Web (.NET Framework)?

and does .NET Framework provide similar performance as to .NET Core?

Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
Justin Homes
  • 3,739
  • 9
  • 49
  • 78
  • I can't access the link do to my firewall policies here at work. But the difference is that .NET Core is cross-platform compatible and doesn't use .NET Framework. The .NET Framework projects obviously use .NET Framework so the framework has to be installed on the server. – Clint B Jun 07 '16 at 16:28

3 Answers3

104

This can be confusing at first, but it's important to remember: at the end of the day, "ASP.NET Core" is just a bunch of NuGet packages that can be installed in your project.

ASP.NET Core on .NET Core is cross-platform ASP.NET Core. It can run on Windows, Mac, and Linux (including Docker). The server doesn't need .NET Core installed - the dependencies can be bundled with the application.

ASP.NET Core on .NET Framework is ASP.NET Core on the "full" or "desktop" .NET Framework (e.g. .NET Framework 4.6.2). These applications can only run on Windows, but everything else about ASP.NET Core behaves the same way.

According to the benchmarks you linked, both will have higher performance than ASP.NET 4.6, although .NET Core is currently the highest:


ASP.NET 4.6: <50k req/sec

ASP.NET Core (CLR): 400k req/sec

ASP.NET Core (.NET Core, Linux): 900k req/sec

ASP.NET Core (.NET Core, Windows): >1.1m req/sec

However, these benchmarks are slightly older (February 2016) and reflect pre-RTM code. I wouldn't be surprised if they've improved since then.

Community
  • 1
  • 1
Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
  • 5
    what is the purpose of having two underlying framework that you can build against? it's one more choice that you have to make to go to .net core or full .net framework to go with asp.net Core. is the goal that .net core does not have all needed functionality to build a web app yet so there is a need for full .net framework – Justin Homes Jun 07 '16 at 17:11
  • 5
    @JustinHomes Applications and packages need to be ported to .NET Core, and sometimes that's difficult depending on the APIs they use. The option exists so you can use ASP.NET Core today on "full" .NET and then port to .NET Core in the future if you want the cross-platform capability. – Nate Barbettini Jun 07 '16 at 17:13
  • Does this scenario actually work with IIS? I tried deploying a asp.net core web application developed on top of full framework and it would not start in IIS. Errors about missing dlls – JBA Jul 07 '16 at 04:35
  • @JBA Interesting. Sounds like a good candidate for a new question :) – Nate Barbettini Jul 07 '16 at 04:45
  • 3
    @NateBarbettini Have already raised a question. http://stackoverflow.com/q/38237576/2056869 – JBA Jul 07 '16 at 04:50
  • 2
    @NateBarbettini Does all nuget packages work if the ASP.NET Core on .NET Framework (CLR) is used or will it be compatibility issues due to ASP.NET Core? – Jonas Oct 09 '16 at 19:36
  • 2
    @JonasAxelsson Yes, if the packages support the CLR (i.e. `netstandard1.1` or higher, or `net451` or higher). – Nate Barbettini Oct 10 '16 at 03:36
  • No more true for ASP.NET Core 2.0 - preview. No possibility to target full "desktop".NET framework. – Ondrej Tomcik May 12 '17 at 21:50
  • @OndrejTomcik Yes, although it sounds like the limitation only applies to the preview. – Nate Barbettini May 13 '17 at 01:36
16

ASP.NET Core with .NetCore is a cross-platform (it can run on Windows, Linux or other platforms), high-performance, open-source framework for building modern, cloud-based, Internet-connected applications. It has ability to host on IIS, Nginx, Apache, Docker, or self-host in your own process.

ASP.NET Core ships entirely as NuGet packages. This allows you to optimize your app to include only the necessary NuGet packages. In fact, ASP.NET Core 2.x apps targeting .NET Core only require a single NuGet package. The benefits of a smaller app surface area include tighter security, reduced servicing, and improved performance.

It is not required to install .Net framework to run asp.net core with .net core application. An ASP.NET Core application with .net core is a console app that creates a web server in its Main method. It uses Kestrel web server to run the application.

We can also use editors such Visual Studio Code, Atom to run the application.

It doesn't support Aspx, WPF, WCF and WebServices as if now. It supports inbuilt dependency injection. Uses coreclr which is the runtime in asp.net core with .net core.

Asp.Core with .Net framework .Net framework on the other hand started much before 2005 and it kept on adding new features making it a bit complex framework and heavier. It is not cross platform. It supports Aspx, WPF, WCF and WebServices

.Net Framework excecution plan enter image description here

.Net core exceution plan enter image description here

Nayas Subramanian
  • 2,269
  • 21
  • 28
5

ASP.NET Core using .NET Core - all dependencies are self-contained, can use most nuget packages, cant use windows specific packages, can execute on windows, linux, Mac

ASP.NET Core using .NET Framework - most dependencies are self-contained, only executes on windows, will have access to windows specific nuget packages, needs the .net framework version which is targeted installed on the machine

Audwin Oyong
  • 2,247
  • 3
  • 15
  • 32
Nathan Alard
  • 1,753
  • 17
  • 9