-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No valid SSL certificate #3
Comments
I have to re-check what’s I have here. But my first guess is that Https is not supported in this mode. Maybe I can help with rd.xml but because this is security people are touchy about changing things. |
I removed the https from the startup profiles but the same error still arises. |
Ha-ha, I apologize for having you hang for a long time. https://github.com/kant2002/NativeAOTDocker/tree/main?tab=readme-ov-file#web-api---2515-mb I already have explanation how you should run with certificates. Basically you should create these certs and ship into container. Let me know how it goes. |
For HTTP only I miss |
I didn't see that. May I recommend having it run http only as default, and have the readme explain how to enable https? |
For SSL configuration take a look at https://learn.microsoft.com/en-us/dotnet/core/additional-tools/self-signed-certificates-guide#with-openssl nd create certs folder with certificates. Then you can run following command. docker run --rm -it -p 8000:80 -p 8001:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=8001 -e ASPNETCORE_ENVIRONMENT=Development -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/contoso.com.crt -e ASPNETCORE_Kestrel__Certificates__Default__KeyPath=/https/contoso.com.key -v $PWD\certs/:/https/ nativeaot-scratch-webapi |
Obviously you can try and HTTP only. Just don’t forget set ASPNETCORE_URLS |
This is a good example of what I mean. I don't like to make people go through any effort to run a demo. It would be better to have it already http only, and then have the complex instructions for solving the next step instead of the first. |
I agree that samples should be easy. Honestly you are probably first or second person who reach out about this tech so I a bit disappointed with how people treat NativeAOT 😄 anyway, that’s good suggestion and I will do that. |
I think everything in place now on main branch |
I will have another look, thank you! |
I thought I'd give this library a try, but when I try to run the WebApi sample it throws an exception saying there isn't a valid SSL certificate and then stops.
The text was updated successfully, but these errors were encountered: