简体   繁体   English

ASP.NET Core(.NET Core)和ASP.NET Core(.NET Framework)之间的区别

[英]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)? ASP.NET Core Web(.NET Core)与ASP.NET Core Web(.NET Framework)有什么区别?

and does .NET Framework provide similar performance as to .NET Core? .NET Framework是否提供 .NET Core 类似的性能

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”只是一堆可以安装在项目中的NuGet软件包。

ASP.NET Core on .NET Core is cross-platform ASP.NET Core. .NET Core上的ASP.NET Core是跨平台的ASP.NET Core。 It can run on Windows, Mac, and Linux (including Docker). 它可以在Windows,Mac和Linux(包括Docker)上运行。 The server doesn't need .NET Core installed - the dependencies can be bundled with the application. 服务器不需要安装.NET Core-依赖项可以与应用程序捆绑在一起。

ASP.NET Core on .NET Framework is ASP.NET Core on the "full" or "desktop" .NET Framework (eg .NET Framework 4.6.2). .NET Framework上的ASP.NET Core是“完整”或“桌面” .NET Framework(例如.NET Framework 4.6.2)上的ASP.NET Core。 These applications can only run on Windows, but everything else about ASP.NET Core behaves the same way. 这些应用程序只能在Windows上运行,但是有关ASP.NET Core的所有其他行为都具有相同的行为。

According to the benchmarks you linked, both will have higher performance than ASP.NET 4.6, although .NET Core is currently the highest: 根据您链接的基准 ,尽管.NET Core当前是最高的,但两者都将具有比ASP.NET 4.6更高的性能:


ASP.NET 4.6: <50k req/sec ASP.NET 4.6:<50k请求/秒

ASP.NET Core (CLR): 400k req/sec ASP.NET Core(CLR):40万个请求/秒

ASP.NET Core (.NET Core, Linux): 900k req/sec ASP.NET Core(.NET Core,Linux):900k req / sec

ASP.NET Core (.NET Core, Windows): >1.1m 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. 但是,这些基准稍早一些(2016年2月),反映了RTM之前的代码。 I wouldn't be surprised if they've improved since then. 从那时起,如果它们有所改进,我就不会感到惊讶。

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. 带有.NetCore的ASP.NET Core是一个跨平台 (可以在Windows,Linux或其他平台上运行), 高性能开源框架,用于构建现代的,基于云的,Internet连接的应用程序。 It has ability to host on IIS, Nginx, Apache, Docker, or self-host in your own process. 它具有在IIS,Nginx,Apache,Docker上托管或在您自己的进程中自托管的能力。

ASP.NET Core ships entirely as NuGet packages . ASP.NET Core 完全作为NuGet软件包提供 This allows you to optimize your app to include only the necessary NuGet packages. 这使您可以优化应用程序,使其仅包含必要的NuGet程序包。 In fact, ASP.NET Core 2.x apps targeting .NET Core only require a single NuGet package. 实际上,面向.NET Core的ASP.NET Core 2.x应用程序仅需要单个NuGet程序包。 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. 不需要安装.Net框架即可与.net核心应用程序一起运行asp.net核心。 An ASP.NET Core application with .net core is a console app that creates a web server in its Main method. 具有.net core的ASP.NET Core应用程序是一个控制台应用程序,可通过其Main方法创建Web服务器。 It uses Kestrel web server to run the application. 它使用Kestrel Web服务器运行该应用程序。

We can also use editors such Visual Studio Code, Atom to run the application. 我们还可以使用诸如Visual Studio Code,Atom之类的编辑器来运行该应用程序。

It doesn't support Aspx, WPF, WCF and WebServices as if now. 它不像现在那样支持Aspx,WPF,WCF和WebServices。 It supports inbuilt dependency injection. 它支持内置的依赖注入。 Uses coreclr which is the runtime in asp.net core with .net core. 使用coreclr,它是.net核心在asp.net核心中的运行时。

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. 另一方面,带有.Net框架的Asp.Core .Net框架在2005年之前就开始了,并且它不断添加新功能,使其变得有些复杂且较重。 It is not cross platform. 它不是跨平台的。 It supports Aspx, WPF, WCF and WebServices 它支持Aspx,WPF,WCF和WebServices

.Net Framework excecution plan .Net Framework执行计划 在此处输入图片说明

.Net core exceution plan .Net核心执行计划 在此处输入图片说明

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 使用.NET Core的 ASP.NET CORE-所有依赖项都是自包含的,可以使用大多数nuget包,不能使用Windows特定的包,可以在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 使用.NET Framework的 ASP.NET CORE-大多数依赖项都是自包含的,仅在Windows上执行,将有权访问Windows特定的nuget软件包,需要在计算机上安装有针对性的.net Framework版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建项目 ASP.NET Core (.NET Core) 和 ASP.NET Core (.NET Framework) 有什么区别 - What is the difference between creating a project ASP.NET Core (.NET Core) and ASP.NET Core (.NET Framework) ASP.NET CORE(.NET Framework)和本地化 - ASP.NET CORE (.NET Framework) and Localization 实体框架 6.3 与 ASP.NET 核心 3 - Entity Framework 6.3 with ASP.NET Core 3 模拟asp.net核心5.0的框架 - Mocking framework for asp.net core 5.0 替代 Asp.NET 核心认证框架 - Alternative Asp.NET Core Authentication Framework 将 ASP.NET Core 3 转换为 ASP.NET Core 6 - Shifting form ASP.NET Core 3 to ASP.NET Core 6 ASP.NET Core中UseHttpsRedirection和AddDirectToHttpsPermanent之间的区别 - Difference between UseHttpsRedirection and AddDirectToHttpsPermanent in ASP.NET Core asp.net 内核中的控制台应用程序和 Web 应用程序之间的区别 - Difference between a console application and Web application in asp.net core ASP.NET Core 中的 File()、PhysicalFile()、PhysicalFileResult() 有什么区别? - What is the difference between File(), PhysicalFile(), PhysicalFileResult() in ASP.NET Core? asp.net core 中的 Host 和 WebHost 类有什么区别 - What is the difference between Host and WebHost class in asp.net core
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM