ASP.NET Core is the new version of the ASP.NET web framework mainly targeted to run on .NET Core platform.
ASP.NET Core is a free, open-source, and cross-platform framework for building cloud-based applications, such as web apps, IoT apps, and mobile backends. It is designed to run on the cloud as well as on-premises.
Same as .NET Core, it was architected modular with minimum overhead, and then other more advanced features can be added as NuGet packages as per application requirement. This results in high performance, require less memory, less deployment size, and easy to maintain.
ASP.NET Core is an open source framework supported by Microsoft and the community, so you can also contribute or download the source code from the ASP.NET Core Repository on Github.
ASP.NET 3.x runs only on .NET Core 3.x, whereas ASP.NET Core 2.x runs on .NET Core 2.x as well as .NET Framework.
Why ASP.NET Core?
- Supports Multiple Platforms: ASP.NET Core applications can run on Windows, Linux, and Mac. So you dont need to build different apps for different platforms using different frameworks.
- Fast: ASP.NET Core no longer depends on System.Web.dll for browser-server communication. ASP.NET Core allows us to include packages that we need for our application. This reduces the request pipeline and improves performance and scalability.
- IoC Container: It includes the built-in IoC container for automatic dependency injection which makes it maintainable and testable.
- Integration with Modern UI Frameworks: It allows you to use and manage modern UI frameworks such as AngularJS, ReactJS, Umber, Bootstrap, etc. using Bower (a package manager for the web).
- Hosting: ASP.NET Core web application can be hosted on multiple platforms with any web server such as IIS, Apache etc. It is not dependent only on IIS as a standard .NET Framework.
- Code Sharing: It allows you to build a class library that can be used with other .NET frameworks such as .NET Framework 4.x or Mono. Thus a single code base can be shared across frameworks.
- Side-by-Side App Versioning: ASP.NET Core runs on .NET Core, which supports the simultaneous running of multiple versions of applications.
- Smaller Deployment Footprint: ASP.NET Core application runs on .NET Core, which is smaller than the full .NET Framework. So, the application which uses only a part of .NET CoreFX will have a smaller deployment size. This reduces the deployment footprint.
.NET Core vs ASP.NET Core
.NET Core | ASP.NET Core |
---|---|
Open-source and Cross-platform | Open-source and Cross-platform |
.NET Core is a runtime to execute applications build on it. | ASP.NET Core is a web framework to build web apps, IoT apps, and mobile backends on the top of .NET Core or .NET Framework. |
Install .NET Core Runtime to run applications and install .NET Core SDK to build applications. | There is no separate runtime and SDK are available for ASP.NET Core. .NET Core runtime and SDK includes ASP.NET Core libraries. |
.NET Core GitHub Repository: .NET Core Runtime .NET Core SDK | ASP.NET Core GitHub Repository: https://github.com/dotnet/aspnetcore |
.NET Core 3.1 - latest version | ASP.NET Core 3.1 There is no separate versioning for ASP.NET Core. It is the same as .NET Core versions. |