发布版本(优化代码)不会部署到AWS

问题描述 投票:0回答:1

目前正致力于从Azure迁移到AWS。我已经完成了所有设置和运行(Elastic Beanstalk与经典负载均衡器,SSL通过证书管理器,以及子域通过Route 53),但是当我选择Debug作为项目构建配置时,我当前只能使用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构建时它将无法工作。

asp.net visual-studio amazon-web-services amazon-elastic-beanstalk webdeploy
1个回答
0
投票

弄清楚了。我以某种方式在Package / Publish SQL下为Release版本添加了条目。我删除了它,它部署和工作没有问题。 (要查找,右键单击project-> properties-> Package / Publish SQL)。

© www.soinside.com 2019 - 2024. All rights reserved.