简体   繁体   English

Azure无法连接到SQL Server

[英]Azure cannot connect to SQL Server

I am an Azure newcomer. 我是Azure新手。

I went through Get Started with Azure Cloud Services tutorial and can run the Contoso Ad app locally. 我阅读了《 Azure云服务入门》教程,可以在本地运行Contoso广告应用程序。

When I push it to my dev/test Azure account, the app cannot see the database. 当我将其推送到我的开发/测试Azure帐户时,该应用程序看不到数据库。

You can see it live here: My Dev/Test Azure instance running Contoso Ad App 您可以在此处实时查看它: 运行Contoso Ad App的我的Dev / Test Azure实例

I can run SSMS locally and connect to my database: 我可以在本地运行SSMS并连接到数据库:

在此处输入图片说明 (this works fine) (这很好)

I did have to add my home IP Address to the Firewall rules: 我确实必须将我的家庭IP地址添加到防火墙规则中:

在此处输入图片说明

Questions: 问题:

  1. Is there any way I can see more about what Azure doesn't like when trying to connect to the database? 在尝试连接到数据库时,是否可以通过任何方式了解Azure不喜欢的内容?

  2. I followed the tutorial step-by-step, and I'm sure my connection Strings are correct, especially since I can connect from SSMS at home. 我按照教程逐步进行操作,并且确定我的连接字符串正确,尤其是因为我可以在家中通过SSMS进行连接。 Any firewall changes that need to be made so an Azure Web App can see an Azure SQL Server database? 需要进行任何防火墙更改以使Azure Web App可以看到Azure SQL Server数据库吗?

Thank you very much in advance! 提前非常感谢您!

This turned out to be me not fully understanding how 原来是我不完全了解

  • Web.Config
  • Web.Debug.Config
  • Web.Release.Config

interact. 相互作用。

I learned that Web.Release.Config is only modifying upon a Web/Azure Publish, so I did not see the changes reflected in the local <project>\\bin\\Release folder. 我了解到Web.Release.Config仅在Web / Azure发布时进行修改,因此我看不到本地<project>\\bin\\Release文件夹中反映的更改。

I also learned that by changing the Connection String name in Web.Release.Config , this caused it to not match and transform/overwrite the value in Web.Config . 我还了解到,通过更改Web.Release.Config的连接字符串名称,这导致它不匹配并转换/覆盖Web.Config的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM