【发布时间】:2019-08-06 00:37:13
【问题描述】:
目前正致力于从 Azure 迁移到 AWS。我已经设置并运行了所有东西(带有 Classic Load Balancer 的 Elastic Beanstalk、通过证书管理器的 SSL 和通过 Route 53 的子域),但是当我选择调试作为项目构建配置时,我目前只能使用 AWS Toolkit for Visual Studio 进行部署.如果我选择 Release(我已将其重命名为 Production),它会成功构建,但无法部署。
我收到以下错误:
....packaging - project build completed successfully.
....packaging - CreateProviderList: build error: 'E:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets' at (55,5): Web deployment task failed. (A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified))
....packaging - project build completed with errors.
..build of project archive failed, abandoning deployment
不确定到底出了什么问题,它提到了 SQL 错误,我唯一拥有的是我的实体和其他到 web.config 中 RDS 的连接字符串。如果提供我的网络配置对我有帮助,我可以根据要求在此处添加编辑版本。
MS SQL RDS 实例不是 Elastic Beanstalk 的一部分。它位于 VPC 中,并且已配置适当的安全性。正如我所说,它在构建和部署 Debug 构建时可以正常连接和工作,但在创建 Release 构建时它将无法正常工作。
【问题讨论】:
-
您能描述一下您是如何配置数据库的吗?它是在 Elastic Beanstalk 中运行,还是在 VPC 中运行的 RDS 实例?您是否配置并附加了允许对 RDS 进行入站访问的安全组?
-
@bwest,请参阅帖子底部的补充内容,但是是的,它在 VPC 中并且具有正确的安全组。
标签: asp.net visual-studio amazon-web-services amazon-elastic-beanstalk webdeploy