简体   繁体   中英

Azure cannot connect to SQL Server

I am an Azure newcomer.

I went through Get Started with Azure Cloud Services tutorial and can run the Contoso Ad app locally.

When I push it to my dev/test Azure account, the app cannot see the database.

You can see it live here: My Dev/Test Azure instance running Contoso Ad App

I can run SSMS locally and connect to my database:

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

I did have to add my home IP Address to the Firewall rules:

在此处输入图片说明

Questions:

  1. Is there any way I can see more about what Azure doesn't like when trying to connect to the database?

  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. Any firewall changes that need to be made so an Azure Web App can see an Azure SQL Server database?

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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