If you are using IIS as a Web Server to host your ASP.NET Website, you are doing it inside a Windows Server Core based container and you are reading this article, maybe you want to use HTTPS to allow secure connections to it.
Use HTTPS within an ASP.NET container
Assuming you are using the microsoft/aspnet base image and you have your pfx ready, in order to achieve your goal, you have to follow three simple steps:
- Place your “myCertificate.pfx” certificate file in the root folder of your published ASP.NET project
- In the same folder, create a file named “ssl.ps1”:
- Modify your Dockerfile as follows
That’s it. Enjoy!