SQL connection error after deploying through VS team service release management

对着背影说爱祢 提交于 2019-12-12 03:23:36

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/38998120/sql-connection-error-after-deploying-through-vs-team-service-release-management

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!