Azure Web App 服务返回 403 主机名已禁用

huangapple go评论59阅读模式
英文:

Azure Web App Service returns 403 HostNames Disabled

问题

我使用 Bicep 创建了一个 Azure Web 应用服务,并在部署代码后调用 API 时返回以下错误信息:

> 403 主机名已禁用

如果通过界面访问主机,会显示:

> 错误 403 - 此 Web 应用已停止

我尝试按照建议进行操作,似乎不是重启、配额或代码问题。我尝试使用 Kudu/CMD 启动我的站点,命令是 dotnet MyApp.dll,它可以正确启动。

英文:

I created an Azure web app service using Bicep, and after deploying the code when calling the API it returns:

> 403 HostNames Disabled

If I access the host through the UI it shows:

> Error 403 - This web app is stopped

I have tried following the recommendations and it doesn't seem to be an issue of restarting, quotas, or a code issue. I tried with Kudu/CMD to start my site with dotnet MyApp.dll and it starts correctly.

答案1

得分: 1

在审查我的 Bicep 代码后,我意识到我已将属性 hostNamesDisabled 设置为 true,导致应用程序返回上述状态码。

英文:

After reviewing my own Bicep code, I realized I had set the property hostNamesDisabled to true, causing the application to return the status code above.

huangapple
  • 本文由 发表于 2023年7月18日 16:43:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76710963.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定