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

C#.Netasp.net Core.Net Core

C# Problem Overview


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?

C# Solutions


Solution 1 - C#

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 - C#

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

Solution 3 - C#

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJustin HomesView Question on Stackoverflow
Solution 1 - C#Nate BarbettiniView Answer on Stackoverflow
Solution 2 - C#Nayas SubramanianView Answer on Stackoverflow
Solution 3 - C#Nathan AlardView Answer on Stackoverflow