Home >Backend Development >C#.Net Tutorial >What is Kestral C# Asp.net Core?

What is Kestral C# Asp.net Core?

WBOY
WBOYforward
2023-09-04 20:33:03996browse

什么是 Kestral C# Asp.net Core?

Kestrel is a cross-platform web server for ASP.NET Core. It is supported on all platforms and versions supported by .NET Core.

It is included with ASP.NET Core as an internal server by default. Kestrel itself can be used as an edge server, an Internet-facing web server that can directly handle incoming HTTP requests from clients. In Kestrel, the process used to host applications is dotnet.exe.

Kestrel does not work with InProcess managed models.

With Out In the process hosting model, Kestrel can be used in one of the following 2 ways.

Kestrel can be used as an Internet-facing web server

Kestrel can also be used in combination with a reverse proxy server

When we use the .NET core CLI to run asp.net core applications When running a program, Kestrel is the only web server used to handle incoming HTTP requests.

p>

Example

Using the CLI, we can create a new project, configuration file, or solution based on a specified template

Restore the dependencies and Tools core project build project and all its dependencies run project etc. Run our ASP.NET Core application using the .NET Core CLI. Launch Windows Command Prompt Change directory to the folder containing the ASP.NET Core project and execute the dotnet run command

After the .NET Core CLI builds and runs the project it shows Which URL to use We can access the application.

In my case, the application is available at http://localhost:5000

In Kestrel's case, the process is used to host and execute the application The program is dotnet.exe. So when we navigate to http://localhost:5000 we will see the process name dotnet show.

The above is the detailed content of What is Kestral C# Asp.net Core?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete