Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1493

How to configure HTTPS with a self-signed certificate in a .NET Core 8 app migrated from .NET Core 3

$
0
0

I'm trying to enable HTTPS in my .NET Core 8 application migrated from .NET Core 3 using a self-signed certificate for local development. I've generated the certificate using OpenSSL and added it to my project, but I'm encountering errors when trying to configure Kestrel to use it.

Below is what my Startup.cs looks like:

public void Configure(IApplicationBuilder app, IWebHostEnvironment env){    app.UseHttps("certificate.pfx", "password"); // Configuring HTTPS with the self-signed certificate}

The above code directs me to the below error:

Unhandled exception. System.InvalidOperationException: Unable toconfigure HTTPS endpoint. No server certificate was specified, and thedefault developer certificate could not be found.

I've followed the official documentation on Microsoft's website for configuring HTTPS in .NET Core, but I'm still stuck with no luck.


Viewing all articles
Browse latest Browse all 1493

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>