在 Azure 中,我打开了 IP 限制:
- 网络应用(网络 > 访问限制)
- SQL 服务器(防火墙和虚拟网络 > 添加客户端 IP)
- SQL 数据库(设置服务器设置)
该解决方案仍然在本地和 DevOps(又名 Team Foundation Server)中构建。
但是,Azure 应用服务部署现在失败:
##[error]Failed to deploy App Service.
##[error]Error Code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
More Information: Could not connect to the remote computer
("MYSITENAME.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.
Error: The remote server returned an error: (403) Forbidden.
Error count: 1.
如何通过防火墙进行部署?
我是否需要虚拟网络来将 Azure 资源隐藏在列入白名单的 IP 后面?
最佳答案
REST 站点 scm.azurewebsites.net
必须具有 Allow All
,即没有限制。此外,与 ***.azurewebsites.net
相同的限制应取消选中
。
它不需要额外的限制,因为 URL 访问已经需要 Microsoft 凭据。如果添加限制,部署将使防火墙失败,因此我遇到了许多复杂情况。
关于Azure 应用服务部署返回 (403) Forbidden with IP 限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55477361/