这是我第一次尝试设置CI/CD,希望能对您有所帮助.非常感谢解决方案我必须在Web.config中创建一个未命名为defaultConnection的连接字符串,并将其命名为与VSTS版本定义相同的名称.I have setup build for my WebAPI project through VS team service Builds for continuous integration and I am using VS team service release management continuous deployment to Azure Web App. I am not getting any errors while build or release however when I try to access my Apis through swagger, I get "A network-related or instance-specific error occurred while establishing a connection to SQL Server". Here is what I have as a connection string in VSTS release definition-connectionString @{"xxxx"="Server=tcp:xxxx.database.windows.net,1433;Database=xxxxdb;User ID=xxxxdbuser@xxxx;Password=xxxx;Trusted_Connection=False;Encrypt=True;"}This is my first attempt to setup CI/CD and I would appreciate any help.Many thanks 解决方案 I had to create a connection string in my Web.config which is not named as defaultConnection and name it same as in my VSTS release definition. 这篇关于通过VS Team Service发布管理进行部署后,SQL连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-14 18:02