liveBook · Manning

Server

As explained in ASP.NET Core in Action, 3e

A web server is software or a host system that receives HTTP requests and returns HTTP responses containing web resources.

A web server receives HTTP requests and returns HTTP responses containing web resources. In a browser-based exchange, a URL identifies a host and path, the client sends a request, and the server returns a response that the browser can display. section 1.4.1 section 1.6

An HTTP server handles the exchange in several stages:

  • Receives a request containing a verb, path, headers, and sometimes a body. section 1.4.1
  • Interprets the request and generates an appropriate response, such as HTML, an access-denied message, or another result. section 1.4.2
  • Returns a response containing a status code and optionally headers and a body. section 1.4.1

ASP.NET Core applications include Kestrel by default, a built-in, fast, cross-platform web server. Kestrel receives raw network requests, constructs an HttpContext, passes it to the application, and converts the resulting representation into a raw HTTP response. section 1.4.2 section 2.4.2

Direct hosting and reverse proxies

An ASP.NET Core application can expose Kestrel directly to the internet. More commonly, IIS, NGINX, HAProxy, Apache, or YARP receives internet traffic and forwards requests to the underlying web server, providing a separation associated with security and performance benefits. section 2.4.2

Figure 1.3 How an ASP.NET Core application processes a request. A request is received by the ASP.NET Core application, which runs a self-hosted web server. The web server processes the request and passes it to the body of the application, which generates a response and returns it to the web server. The web server sends this response to the browser.
CH01_F03_Lock3

Trace the request from the browser through the self-hosted ASP.NET Core web server, into the application, and back as an HTTP response. section 1.4.2

How ASP.NET Core in Action, 3e covers it

How deep it goes
Explains HTTP request and response parts, Kestrel hosting, HttpContext construction, and reverse-proxy placement without detailing implementation internals.
Examples
Uses browser page requests, generated HTML, access-denied responses, Kestrel hosting, and IIS or NGINX reverse-proxy deployments.
What it assumes
Assumes basic browser use and introduces HTTP verbs, paths, headers, bodies, status codes, and DNS from first principles.
What you can do after
Evaluate request flow by distinguishing client requests, server processing, application responses, and reverse-proxy forwarding.
How it connects
Connects servers with HTTP, ASP.NET Core, Kestrel, HttpContext, DNS, IIS, and reverse proxies.

Also explained in

Compare how 11 books explain server →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ASP.NET Core in Action, 3e. The section links point to the parts of the book it draws on.