liveBook · Manning

Development certificate

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

A development certificate is a locally trusted certificate intended for securing an application's development-time HTTPS connections.

A development certificate secures HTTPS connections to an application during local development. ASP.NET Core templates use it automatically when no certificate is configured, allowing a browser to connect over HTTPS while you build and test. section 28.0 section 28.2

Expect this local-development behavior:

  • The .NET SDK installs a development certificate the first time you run a dotnet command. section 28.2
  • The certificate is not trusted by default, so browsers may display a security warning. section 28.2
  • Trust the certificate instead of bypassing browser warnings. section 28.2

Trust the local certificate

Run `dotnet dev-certs https --trust` after installing the .NET SDK. Once trusted, locally served HTTPS pages should no longer show certificate warnings. section 28.2 section 28.5

Figure 28.4 The developer certificate is not trusted by default, so apps serving HTTPS traffic using it will be marked as insecure by browsers. Although you can bypass the warnings if necessary, you should instead update the certificate to be trusted.
CH28_F04_Lock3

Use the browser-warning figure to distinguish an untrusted development certificate from a correctly trusted local certificate. section 28.2

The certificate is suitable for local testing only. Production deployments require a real production certificate, or HTTPS termination through a reverse proxy. section 28.0 section 28.5

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

How deep it goes
Explains automatic installation, browser trust, and remediation, but defers production certificate acquisition and configuration.
Examples
Uses the `dotnet dev-certs https --trust` command and browser warning illustrations.
What it assumes
Assumes a .NET SDK or Visual Studio setup, while introducing certificate trust and public-key concepts for newcomers.
What you can do after
Operate/configure local HTTPS by trusting the development certificate and recognizing when it cannot serve production.
How it connects
Connects HTTPS with TLS certificates, certificate authorities, ASP.NET Core, the .NET SDK, Kestrel, and IIS Express.

Also explained in

Compare how 2 books explain development certificate →

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.