Philip Tenn
Philip Tenn

Reputation: 6073

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:

enter image description here (this works fine)

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

enter image description here

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!

Upvotes: 2

Views: 332

Answers (1)

Philip Tenn
Philip Tenn

Reputation: 6073

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.

Upvotes: 3

Related Questions