What is the difference between ASP.NET and ASP.NET Core?

4 minbeginnerASP.NET-Corefundamentals

Quick Answer

ASP.NET is the older Windows-only, .NET Framework web framework tied to System.Web/IIS. ASP.NET Core is a re-architected, cross-platform, open-source framework that runs on .NET Core/.NET 5+, with built-in DI, a unified MVC/Web API/Razor model, Kestrel server, and higher performance. ASP.NET Core is the modern, recommended choice for new development.

Detailed Answer

FeatureASP.NETASP.NET Core
PlatformWindows onlyCross-platform (Windows, Linux, macOS)
FrameworkBuilt on .NET FrameworkBuilt on .NET Core/.NET 5+
PerformanceGoodSignificantly faster and more efficient
HostingIIS onlyIIS, Kestrel, Nginx, Apache, Docker
Open SourcePartiallyFully open source
ConfigurationWeb.config (XML)appsettings.json, environment variables
Dependency InjectionNot built-in (needs third-party)Built-in DI container
Web FormsSupportedNot supported
Project StructureComplex, tightly coupledModular, lightweight
Side-by-side deploymentNot supportedSupported
Cloud optimizationLimitedHighly optimized for cloud

Key advantages of ASP.NET Core:

  • Better performance and scalability
  • Modern architecture with cleaner separation of concerns
  • Built-in dependency injection
  • Unified programming model for web UI and web APIs
  • Can run on multiple platforms