【问题标题】:Trouble configuring azure app service from publish in Visual Studio, can't access endpoints在 Visual Studio 中从发布配置 Azure 应用服务时遇到问题,无法访问端点
【发布时间】:2021-08-11 04:36:51
【问题描述】:

我正在尝试向我的 azure 应用服务发布一个简单的 .net 5 API,没有前端。我从 Visual Studio 发布到现有的应用服务。当我发布时,它会将所有 .dll 和 .exe 生成到 wwwroot 文件夹。当我尝试访问我的端点时,我收到了 500 错误。

wwwroot folder with all posted files.

path mapping in configuration

【问题讨论】:

  • 500 详细信息是什么?请您发布错误详细信息吗?

标签: .net azure api azure-web-app-service azure-appservice


【解决方案1】:

尝试先记录错误并发送错误消息以供进一步分析。 要生成错误日志,请按照以下步骤操作 -

转到您的应用服务的 SCM 站点 - https://yoursitename.scm.azurewebsites.net 或从导航刀片使用 App Service Editor

  • 导航到应用部署目录,找到web.config文件
  • 设置stdoutLogEnabled为真改变
  • stdoutLogFile 指向日志文件夹的路径(例如:.\logs\stdout)
  • 保存web.config 文件并向应用发出请求
  • 导航到d:\home\LogFiles 文件,它应该可以很好地了解导致 500 错误的原因。

详细步骤可以在这个链接中找到——https://docs.microsoft.com/en-us/answers/questions/202561/azure-web-app-net-core-start-up-error-how-to-find.html

【讨论】:

  • 谢谢,这帮助我找出了错误所在。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-12-10
  • 2012-05-21
  • 1970-01-01
  • 1970-01-01
  • 2019-11-30
  • 1970-01-01
  • 2020-07-14
相关资源
最近更新 更多