Azure 错误 403 此站点已停止

Azure Error 403 this site is stopped

我有一个 asp.net mvc5 站点 运行 来自 azure 网站,它 运行 来自 D1 共享基础设施。

在过去的几天里,我在部署时遇到了一些问题。它有时无法部署。 (我已经算出了我的网站名称)

Error 26 Web deployment task failed. (Could not connect to the remote computer ("#####.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.)

现在,当我部署时,我得到

Error 403 - This web app is stopped.

。当我查看 Azure 门户网站时,它说该站点是 运行 并且我在 ftp logfiles\http\rawlogs\ 中看不到任何表明此问题的信息。即我只能看到 200 个响应,从该网站上次响应开始。

通过门户重新启动站点似乎没有什么不同。

如何诊断此问题的原因?它是否可能与我对我的应用程序所做的任何更改有关,而不是服务器基础架构问题?

如果您的网站处于共享模式,您可能 运行 会遇到配额问题。请尝试升级到标准模式。

这是一个屏幕截图:

我遇到了同样的问题。我们的站点未处于共享模式,将 up/down 扩展到另一个服务计划暂时有所帮助,但问题很快又出现了。

原来登台环境不好。

为了解决这个问题,我不得不交换、删除暂存槽,然后等待大约 30 分钟才能重新创建它(出现错误提示主机名仍然存在)。

我也遇到了来自 Azure Devops 的相同部署问题,并且该站点未处于共享模式。

Failed to deploy web package to App Service.    
Error Code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC    
More Information: Could not connect to the remote computer ("######.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.    
Error: The remote server returned an error: (403) Forbidden.    
Error count: 1.    
Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed with return code: 4294967295

我无法从我的本地计算机访问 Kudu 站点 (######.scm.azurewebsites.net),但我能够从 Azure 订阅中的 JumpBox VM 访问。

检查 resources.azure.com 的设置后,我注意到在 "web" 设置下:

https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{SiteName}/config/web?api-version=2018-02-01

"scmIpSecurityRestrictionsUseMain" 值已设置为 "true"。我将其设置回 "false" 并且能够再次在本地部署和查看 Kudu。