简体   繁体   English

如何构建 netcore 3.0 Webapi 并部署到 Azure Linux 应用服务

[英]How to build a netcore 3.0 Webapi and deploy to an Azure Linux app service

I have a netcore 3.0 Web api that I've developed and tested on Windows using Visual Studio 2019.我有一个使用 Visual Studio 2019 在 Windows 上开发和测试的 netcore 3.0 Web api。

I have deployed it to a Windows Web app on a Windows app service plan.我已将其部署到 Windows 应用服务计划中的 Windows Web 应用。 This runs as expected.这按预期运行。

I then created a Linux app service plan with a net core 3.0 Linux Web app on azure using "executable" and not "Docker".然后,我使用“可执行文件”而不是“Docker”在 azure 上创建了一个带有 net core 3.0 Linux Web 应用程序的 Linux 应用程序服务计划。

Next I attempted to publish my Web app from Visual Studio 2019 to this instance.接下来,我尝试将我的 Web 应用程序从 Visual Studio 2019 发布到此实例。 It succeeds however my web app just gives the following fault它成功了但是我的网络应用程序只是给出了以下错误

在此处输入图片说明

I have tried deploying as Linux-x64 and portable.我试过部署为 Linux-x64 和可移植的。 I have also tried selecting framework dependent and self contained as the deployment mode.我还尝试选择依赖框架和自包含作为部署模式。

Some simply show the error above, the other combinations just time out.有些只是显示上面的错误,其他组合只是超时。

Is there an official MS guide to do what I am attempting to do above?是否有官方的 MS 指南来做我上面尝试做的事情?

If not how can I diagnose the error.如果不是,我如何诊断错误。 Can I remote in via SSH?我可以通过 SSH 远程访问吗? Are there error logs anywhere?任何地方都有错误日志吗?

Can I remotely debug the instance?我可以远程调试实例吗?

If not can I build and test the Linux version using the Linux subsystem for Windows?如果不能,我可以使用适用于 Windows 的 Linux 子系统构建和测试 Linux 版本吗?

If you're not sure about how to deploy your application, you can create a new Devops project on Azure portal and import your source code later.如果不确定如何部署应用程序,可以在 Azure 门户上创建一个新的 Devops 项目并稍后导入源代码。

  • Search for Devops Project搜索 DevOps 项目
  • Select .NET as application from the template click Next从模板中选择 .NET 作为应用程序单击下一步
  • Select ASP.NET Core as application framework click Next选择 ASP.NET Core 作为应用程序框架点击下一步
  • Select Linux Web App as a Service选择 Linux Web App as a Service
  • Pass the necessary paramters in the next step and you are done在下一步中传递必要的参数,你就完成了

you should be able to compare and apply the same你应该能够比较和应用相同的

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 gRPC 服务部署到 Azure Linux 应用服务 - 端口未打开 - Deploy gRPC service to Azure Linux App Service - port not open 无法在 Azure 应用服务 Linux 中部署 NodeJS(Fastify 应用) - Unable to deploy NodeJS (Fastify app) in Azure App Service Linux 如何在单个基于 linux 的 azure 应用服务中部署多个 .net 核心应用程序 - how to deploy multiple .net core application in single linux based azure app service 如何在 Azure App Service Linux 上运行脚本 - How Run script on Azure App Service Linux Azure 发布管道发布到 NetCore 3.1 linux 应用服务失败,退出代码为 145 - '无法在日志中找到任何 .NET 核心 SDK' - Azure release pipeline publish to NetCore 3.1 linux app service fails with exit code 145 - 'Not possible to find any .NET Core SDKs' in log 如何从 Visual Studio 在 Linux 上部署 Azure Function 应用程序 - How to deploy Azure Function App on Linux from Visual Studio 如何构建和部署Linux驱动程序? - How to build and deploy a Linux driver? 我可以在Linux平台上构建.net-core应用程序,然后再部署到Azure Web应用程序吗 - Can I build my .net-core application on a linux platform, then deploy to an azure web app Azure Linux 应用服务:从 Devops 管道部署后安装包 - Azure Linux App Service : Installing packages after deploy from Devops pipeline 如何在Azure Linux应用服务上托管的应用中打开端口 - How to open ports to in Apps hosted on Azure Linux App Service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM