Evenementer
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
Mat 4 Chance fir matzemaache kënnt Dir e Konferenz-Pak gewannen an op d’LIVE Grand Finale zu Las Vegas kommen
Méi gewuer ginnDëse Browser gëtt net méi ënnerstëtzt.
Upgrat op Microsoft Edge fir vun de Virdeeler vun leschten Eegeschaften, Sécherheetsupdaten, an techneschem Support ze profitéieren.
Notiz
This isn't the latest version of this article. For the current release, see the .NET 9 version of this article.
Warnung
This version of ASP.NET Core is no longer supported. For more information, see the .NET and .NET Core Support Policy. For the current release, see the .NET 9 version of this article.
Wichteg
This information relates to a pre-release product that may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
For the current release, see the .NET 9 version of this article.
By Tom Dykstra, Steve Smith, Stephen Halter, and Chris Ross
An ASP.NET Core app runs with an in-process HTTP server implementation. The server implementation listens for HTTP requests and surfaces them to the app as a set of request features composed into an HttpContext.
ASP.NET Core ships with Kestrel server, which is the default, cross-platform HTTP server.
Kestrel server is the default, cross-platform HTTP server implementation. Kestrel provides the best performance and memory utilization, but it doesn't have some of the advanced features in HTTP.sys. For more information, see Kestrel vs. HTTP.sys in this document.
Use Kestrel:
By itself as an edge server processing requests directly from a network, including the Internet.
With a reverse proxy server, such as Internet Information Services (IIS), Nginx, or Apache. A reverse proxy server receives HTTP requests from the Internet and forwards them to Kestrel.
Either hosting configuration—with or without a reverse proxy server—is supported.
For Kestrel configuration guidance and information on when to use Kestrel in a reverse proxy configuration, see Kestrel web server in ASP.NET Core.
ASP.NET Core ships with Kestrel server, which is the default, cross-platform HTTP server.
For information on how to use Nginx on Linux as a reverse proxy server for Kestrel, see Host ASP.NET Core on Linux with Nginx.
If ASP.NET Core apps are run on Windows, HTTP.sys is an alternative to Kestrel. Kestrel is recommended over HTTP.sys unless the app requires features not available in Kestrel. For more information, see HTTP.sys web server implementation in ASP.NET Core.
HTTP.sys can also be used for apps that are only exposed to an internal network.
For HTTP.sys configuration guidance, see HTTP.sys web server implementation in ASP.NET Core.
The IApplicationBuilder available in the Startup.Configure
method exposes the ServerFeatures property of type IFeatureCollection. Kestrel and HTTP.sys only expose a single feature each, IServerAddressesFeature, but different server implementations may expose additional functionality.
IServerAddressesFeature
can be used to find out which port the server implementation has bound at runtime.
If the built-in servers don't meet the app's requirements, a custom server implementation can be created. The Open Web Interface for .NET (OWIN) guide demonstrates how to write a Nowin-based IServer implementation. Only the feature interfaces that the app uses require implementation, though at a minimum IHttpRequestFeature and IHttpResponseFeature must be supported.
The server is launched when the Integrated Development Environment (IDE) or editor starts the app:
When launching the app from a command prompt in the project's folder, dotnet run launches the app and server (Kestrel and HTTP.sys only). The configuration is specified by the -c|--configuration
option, which is set to either Debug
(default) or Release
.
A launchSettings.json
file provides configuration when launching an app with dotnet run
or with a debugger built into tooling, such as Visual Studio. If launch profiles are present in a launchSettings.json
file, use the --launch-profile {PROFILE NAME}
option with the dotnet run
command or select the profile in Visual Studio. For more information, see dotnet run and .NET Core distribution packaging.
HTTP/2 is supported with ASP.NET Core in the following deployment scenarios:
†Kestrel has limited support for HTTP/2 on Windows Server 2012 R2 and Windows 8.1. Support is limited because the list of supported TLS cipher suites available on these operating systems is limited. A certificate generated using an Elliptic Curve Digital Signature Algorithm (ECDSA) may be required to secure TLS connections.
†Kestrel has limited support for HTTP/2 on Windows Server 2012 R2 and Windows 8.1. Support is limited because the list of supported TLS cipher suites available on these operating systems is limited. A certificate generated using an Elliptic Curve Digital Signature Algorithm (ECDSA) may be required to secure TLS connections.
†Kestrel has limited support for HTTP/2 on Windows Server 2012 R2 and Windows 8.1. Support is limited because the list of supported TLS cipher suites available on these operating systems is limited. A certificate generated using an Elliptic Curve Digital Signature Algorithm (ECDSA) may be required to secure TLS connections.
An HTTP/2 connection must use Application-Layer Protocol Negotiation (ALPN) and TLS 1.2 or later. For more information, see the topics that pertain to your server deployment scenarios.
For guidance on creating a reliable, secure, performant, testable, and scalable ASP.NET Core app, see Enterprise web app patterns. A complete production-quality sample web app that implements the patterns is available.
Feedback zu ASP.NET Core
ASP.NET Core ass en Open-Source-Projet. Wielt e Link, fir Feedback ze ginn:
Evenementer
Power BI DataViz World Championships
Feb 14, 4 PM - Mar 31, 4 PM
Mat 4 Chance fir matzemaache kënnt Dir e Konferenz-Pak gewannen an op d’LIVE Grand Finale zu Las Vegas kommen
Méi gewuer ginnTraining
Modul
Introducción al desarrollo web de .NET con ASP.NET Core - Training
En este módulo, obtendrá información sobre el desarrollo web de .NET con ASP.NET Core, incluyendo qué es y cuándo usarlo.
Zertifizéierung
Microsoft Certified: Windows Server Hybrid Administrator Associate - Certifications
Como administrador híbrido de Windows Server, integra los entornos de Windows Server con servicios de Azure y administra Windows Server en redes locales.
Dokumentatioun
Servidor web Kestrel en ASP.NET Core
Obtenga información sobre Kestrel, el servidor web multiplataforma de ASP.NET Core.
Implementación del servidor web HTTP.sys en ASP.NET Core
Obtenga información sobre HTTP.sys, un servidor web para ASP.NET Core en Windows. Basado en el controlador de modo kernel de HTTP.sys, HTTP.sys es una alternativa a Kestrel que se puede usar para conectarse directamente a Internet sin IIS.
Cuándo usar un proxy inverso con el servidor web Kestrel de ASP.NET Core
Obtenga información sobre cuándo usar un proxy inverso delante de Kestrel, el servidor web multiplataforma para ASP.NET Core.