Deploying Azure Linux Self.contained "No server certificate was specified"

Vote:
 

Trying to deploy Optimizely CMS 12 to Azure Web App Linux.x64 self-contained .net6 site. 

In logstream kudu, i see this error when running the docker, how do i get around this?

Deploying thru Publish in VS, for now just using "<site>.azurewebsites.net" default domains that should be secure. 

I do NOT have app.UseHttpsRedirection(), also turned off HTTPS only in Azure. 

Unhandled exception. System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.

To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.

For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.

at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action`1 configureOptions)
at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IEnumerable`1 listenOptions, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at Epicweb.Optimizely.Blog.Program.Main(String[] args) in C:\webb\Epicweb.Optimizely.Blog\Epicweb.Optimizely.Blog\Program.cs:line 24

docker:

docker run -d --expose=8080 --name blog_0_12dcf4dd -e WEBSITE_SITE_NAME=blog -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=myblog.azurewebsites.net -e WEBSITE_INSTANCE_ID=6bea4f1fb3b020560009c8eXXXX -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=True appsvc/dotnetcore:6.0_20220826.8.tuxprod
#288067
Edited, Sep 25, 2022 6:44
Vote:
 

I think it sounds a bit off to use publish to App Service and Docker or am I misunderstanding something?

When Docker image is involved I've usually had to publish my image to Container Registry first but then it's been completely fine to just validate the image runs app on port 80 and let App Service handle SSL.

#288120
Sep 26, 2022 16:44
Vote:
 

You should not need to run https, update the url to 

 "urls": "http://*:8080/"
#288123
Sep 26, 2022 20:15
Vote:
 

Bingo Mark, i had serveral urls, and one was https, changed to your suggestion and it worked.

Johan, VS allows you to very simply publish to your Azure Service App (Linux) and boom it creates everything for ya, publishing and docker runing took 40sek for site to run.

#288124
Sep 26, 2022 20:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.