-
Hi, I am using Fluent UI in a local docker container for tests, I managed to run the application with my self signed ssl certificate but I have some issues caused by FluentIcon see image below Any hint? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Have you seen this: https://stackoverflow.com/questions/54402673/how-to-fix-ssl-certificate-problem-self-signed-certificate-in-certificate-chai |
Beta Was this translation helpful? Give feedback.
-
I managed to run the container, if someone need here my solution: In Program.cs file #if DEBUG
services.AddHttpClient("").ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler
{
ClientCertificateOptions = ClientCertificateOption.Manual,
ServerCertificateCustomValidationCallback = (httpRequestMessage, cert, cetChain, policyErrors) =>
{
return true;
}
});
#else
services.AddHttpClient();
#endif I use a powershell script to launch the docker compilation, first lines download my local certificate self signed and trusted by dotnet $mypwd = ConvertTo-SecureString -String '1234' -Force -AsPlainText
Get-ChildItem -Path Cert:\LocalMachine\My\ | Where-Object { $_.Subject -like 'CN=localhost' } | Select-Object -First 1 | Export-PfxCertificate -FilePath mylocalhost.pfx -Password $mypwd
Get-ChildItem -Path Cert:\LocalMachine\My\ | Where-Object { $_.Subject -like 'CN=localhost' } | Select-Object -First 1 | Export-Certificate -Type CERT -FilePath mylocalhost.cer inside the classic docker file provided by Microsoft add the installation of the package: ca-certificates
Now you can run the Blazor application in your docker desktop with SSL enabled without issues docker run --rm -it -p 80:80 -p 443:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=443 -e ASPNETCORE_Kestrel__Certificates__Default__Password="1234" -e ASPNETCORE_Kestrel__Certificates__Default__Path=mylocalhost.pfx -d --name MyApp MyApp:latest |
Beta Was this translation helpful? Give feedback.
Have you seen this: https://stackoverflow.com/questions/54402673/how-to-fix-ssl-certificate-problem-self-signed-certificate-in-certificate-chai