Enn*_*Enn 5 azure azure-devops azure-webapps
我已将 .NET Core 3(预览版 9)发布到在 Linux 上运行的 Azure Web 应用程序。不幸的是,该应用程序无法启动,日志显示以下错误:
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.
2019-09-18T11:45:51.528664649Z To generate a developer certificate run 'dotnet dev-certs https'
*.azurewebsites.net我正在使用默认启用 SSL 的域访问该网站。我已经将这个应用程序发布到 Windows Web 应用程序,没有遇到任何问题。
我对 Linux 不太熟悉,但我想在那里托管它,因为它更便宜并且似乎提供更好的性能。有什么想法可以解决这个问题吗?
原来是配置问题。一旦我切换到使用
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseUrls(YourUrls)
.UseKestrel()
.ConfigureKestrel(options =>
{
options.ListenAnyIP(8080);
})
.UseIIS()
Run Code Online (Sandbox Code Playgroud)
它在 Linux 下开始工作得很好。
| 归档时间: |
|
| 查看次数: |
3064 次 |
| 最近记录: |