Difference between ASP.NET Core (.NET Core) and ASP.NET Core (.NET Framework)

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?


Solution 1:

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.

Solution 2:

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