CodeDigest.Com Logo
Featured:

Asp.Net Vs Asp.Net Core [Classic Asp.Net vs Asp.Net Core (Asp.Net Core MVC)] - Comparison

Tagged as: Asp.Net Asp.Net MVC Asp.Net Core .Net Core Posted By

Asp.Net Core is newer version of Asp.Net released with .Net Core framework. Asp.Net Core is initially called Asp.Net vNext and it had series of naming changes like Asp.Net 5.0, Asp.Net MVC Core 6.0 and finally it was named as Asp.Net Core. Asp.Net Core is complete re-write of existing Asp.Net and follows a totally different development approach when compared to traditional Asp.Net framework. It is an open source and a platform independent framework for developing web applications. Learn more about Asp.Net Core here.

The first version of Asp.Net Core is 1.0 and it is released with Visual Studio 2015 Update 3. Asp.Net Core and Visual Studio project templates went through series of updations and the final project template was released with Visual Studio 2017 along with Asp.Net Core 1.1. Since Asp.Net Core is totally a new framework with new implementation it will be better if we understand the basic differences between traditional Asp.Net and Asp.Net Core framework. The following side by side comparison table helps you understanding the differences.

Asp.Net and Asp.Net Core - Side by Side Comparison

Asp.Net

Asp.Net Core

The newer version of Asp.Net is 4.6

The latest version of Asp.Net Core is 1.1

It runs on .NetFramework or commonly called as Full .NetFramework

It runs on .Net Core and Full .NetFramework.

It runs on only Windows environment. Though, we have Mono for Linux deployment it is not a complete implementation like .NetFramework

It is platform independent. Runs on all major platforms.

Though Asp.Net MVC and WebAPI are open source, the Asp.Net framework is not.

It is fully open source.

Repository: https://github.com/aspnet/home

Supports Asp.Net WebForm, Asp.Net MVC and Asp.Net WebAPI

No WebForms Support. Supports Asp.Net MVC, Web API and Asp.Net Web Pages support to be added in .Net Core 2.0.

Asp.Net is not modular framework. It requires .Net Framework to be installed in the machine or server.

 

Asp.Net Core is a modular framework i.e. application can be run with minimal required framework components. The required framework components can only be included in the app unlike traditional Asp.Net where it runs over the full .Net framework.

All components including runtime are available as Nuget packages.

Cannot be bin deployed. Need .NetFramework installed on the server before deployment. The Asp.Net MVC libraries alone can be bin deployed though.

Framework components can be bin deployed. This means we do not need .Net Core framework already installed on the server for deployment.

Includes many default components on the request pipeline and some additional overheads like page ViewState which degrades performance.

Due to its modular in nature, it performs way better than traditional Asp.Net.

Supports OWIN with Project Katana library. But, Asp.Net Core gives the original flexibility of OWIN specification. Cannot implement Asp.Net applications without System.Web.dll and hence implementing an OWIN application or host-agnostic application is difficult.

Know more about OWIN: What is OWIN? A Beginners Guide

Supports OWIN specification. It has a new implementation of OWIN.

Heavily dependent on System.Web.dll and so it can be used only with IIS

No dependency with System.Web.dll and so the IIS.

Supports Application Domain for application isolation, inbuilt Code Access Security policy for security

No support for Application Domain and Code Access Security policies.

It can be hosted with only IIS (Internet Information Services) that comes as part of Operating System. Though it is free webserver but the Windows Operating system is licensed.

It comes with its own cross platform webserver called Kestrel. Asp.Net Core applications can be hosted with Kestrel behind the most common webservers like Nginx, Apache, IIS, etc. These webservers act as reverse proxy forwarding the request to Kestrel server. It can be self-hosted.

Kestrel Quick Start Guide: Learn Kestrel Webserver in 10 Minutes

Supports HttpHandlers and HttpModules for Request/Response filtering, etc. This are IIS dependent components.

Supports Asp.Net Core Middlewares (evolved from OWIN middleware) for this.

Learn more about OWIN middleware:

Understanding and Creating OWIN Middlewares - Part 1

Understanding and Creating OWIN Middlewares - Part 2

Though there is a command line support but not complete as Asp.Net Core’s support.

Example: aspnet_regiis, aspnet_merge, aspnet_compiler, aspnet_regsql

Includes a cross platform command line interface called dotnet CLI.

dotnet CLI Quick Start Guide: Learn dotnet CLI(Command Line Interface for .Net Core) in 10 Minutes

Supports Forms Authentication through FormsAuthentication HttpModule.

Supports Cookie Authentication middleware for providing forms authentication.

Web.Config support. Appsettings and other framework settings goes here.

No Web.Config support. AppSettings is part of json based configuration file called appSettings.json

Global.asax file or supports HttpApplication object for application level events

No Global.asax file.

Only Startup class for similar implementation.

 

Read this article here to know more about Startup class(Point 2 under Visual Studio 2017 New Project Layout section)

Supports C#, VB and many other languages.

Only C#, F# language support. VB support to be added in near future.

Supports WCF,WPF and WF

No support for WCF, WPF and WF.

Support for WCF client libraries are available.

Asp.Net MVC and WebAPI are separate framework.

WebAPI is merged with Asp.Net MVC controller. So, Asp.Net MVC and WebAPI are single framework in Asp.Net Core.

Dependency Injections can be incorporated using DI containers like Unity, StructureMap, Autofac, etc.

Dependency Injection is part of Asp.Net MVC framework.

Container support is not as good as Asp.Net Core applications.

Best suited for Container based deployments like Docker.

In general, traditional Asp.Net is primarily built as an advancement of Classic ASP framework and to develop web applications utilizing the desktop application developer skills using event-driven model (Page, Control and Application events).

Asp.Net Core is totally new, light weight, cloud ready and it is built to compete with Open Source web stack frameworks for building next gen applications. Unlike Asp.Net, the Asp.Net Core is delivered as open source and accepts community contributions.

 

Visual Studio IDE Difference between Asp.Net and Asp.Net Core Projects

Let’s see some of the differences between Asp.Net project and Asp.Net Core projects in Visual Studio IDE.

Visual Studio IDE Support for Asp.Net

Visual Studio IDE Support for Asp.Net Core

Complete support in all major versions

Supports Asp.Net Core from Visual Studio 2015 Update 3. Current version is Visual Studio 2017

No cross platform IDE support.

Has a cross platform IDE version called Visual Studio Code.

Supports Nuget Package Manager and maintains the package dependencies in packages.config file

Nuget Dependencies are part of project file.

Heavy project files when compared to Asp.Net Core projects.

Has a simplified and lean project files. In 2015, it supported project.json for maintaining project dependencies which is moved inside project file.

Know more about Asp.Net Core project template:

Understand Asp.Net Core Project Structure in Visual Studio 2017

No inbuilt support for Bower. We need to work manually to integrate bower.

Supports client side package managers like Bower.

Bower Quick Start Guide: Learn Bower Package Manager in 10 Minutes

No inbuilt support for gulp and grunt. We need to work manually to integrate gulp and grunt.

Supports client side task runners like gulp and grunt.

Manages the static files and client-side scripts inside Content and Script folder.

All static contents and client-side scripts are now part of wwwroot folder

Need to re-compile after a code change.

No Need to recompile after changing code. A browser refresh will compile and execute the code.

Since, Asp.Net and Asp.Net Core are released to build web applications and also Asp.Net Core is built from the traditional Asp.Net framework, there are many similarities between them. Let’s see the similarities between these web frameworks in next section.

 

Similarities between Asp.Net and Asp.Net Core

Asp.Net

Asp.Net Core

Supports Entity Framework

Supports Entity Framework Core

Supports Asp.Net MVC

Support Asp.Net MVC Core

Has Nuget packages for Asp.Net MVC, WebAPI and other Microsoft and community Frameworks.

Primarily dependent on Nuget Packages

Works on .NetFramework CLR and Base Class Library

Has new implementation of CLR and Base Class library

Naturally supports IIS

IIS support is provided by a new HttpModule called Asp.Net Core Module.

Repository: https://github.com/aspnet/AspNetCoreModule

Supports SignalR

Supports SignalR

Supports async programming

Supports async programming

 

*If there are any missing feature difference or similarities, please comment below.



Feedback

Comments