[ASP.NET Core] Apply a selfsigned certificate to asp.net core?
So i don't know exactly what i'm doing, but i'm trying to do the following:
Let's say that i have the following domain purchased:
mywebsite.com
. I'm trying to redirect api.mywebsite.com
to localhost by adding in the hosts file
As expected this does not play nice with browsers or other programs, because the certificate provided by ASP.NET Core has nothing to do with mywebsite.com
or api.mywebsite.com
.
I tried creating a self signed certificate like this in Powershell
But i don't know how to use that in ASP.NET Core (if that's even what i have to do to make this work)
So is this possible or using a domain like that in localhost is completly impossible (without warnings atleast)1 Reply
https://learn.microsoft.com/en-us/dotnet/core/additional-tools/self-signed-certificates-guide
i think you can follow this they explain how to do with powershell
ignore the docker if you don't use it
Generate Self-Signed Certificates Overview - .NET
An overview of the Microsoft dotnet dev-certs tool that adds functionality for .NET Core and ASP.NET Core projects, and other options for using self-signed certificates.