I am testing an asp.net core web API application with Swagger from Visual Studio 2022 in a windows hosting pack at IONOS.
When I create an application of the asp.net core web API and uncheck the "Configure for HTTPS" option, and publish the application via FTP, it works with HTTP. However, when I check the "Configure for HTTPS" option, which is how it should work with HTTPS, and publish the application via FTP, I cannot access it, neither by HTTP nor by HTTPS. It always redirects to HTTPS but I receive the ERR_SSL_PROTOCOL_ERROR when trying to access it via HTTPS.
I would appreciate it if you could give me some guidance on how to solve this error, because I always receive this error from any device.
On the one hand, the SSL certificate is active from the IONOS panel, and I only enable the "Configure for HTTPS" check from Visual Studio, but I never "use" the IONOS certificate in my app. I have never used certificates in ASP.NET, so I don't know where the problem may be.
In summary, when creating an asp.net core web API application:
"Configure for HTTPS" unchecked:
HTTP = I can access the app
HTTPS = ERR_SSL_PROTOCOL_ERROR
"Configure for HTTPS" checked:
HTTP = Redirects to HTTPS
HTTPS = ERR_SSL_PROTOCOL_ERROR