Cannot connect to Azure SQL database, even with whitelisted IP

If you're using corporate network for internet access and facing this problem, a simple way around this is to use your phone's mobile hotspot for internet access instead.

Be sure to disable your ethernet connection too, which may also be connected to the internet.


Spent hours on this issue. The fix for me was finally found to be my setting on the Xfinity firewall. I had it set to high. Once I changed the setting to low security, I could connect to the Azure sql database with no issues.


To summarize.

Windows Azure SQL Database (formerly known as SQL Azure) works exclusively and only on TCP port 1433. It only support SQL Server Authentication, TCP connection and TDS protocol as of today.

In order to successfully establish connection to SQL Azure one must fulfil the following requirements:

  • Create SQL Azure server & Database
  • Setup SQL Azure Server's firewall rules to accept connections from the IP address of application that will connect to that server
  • Make sure the box (be it Virtual, or home, or whatever) has no blocking outbound TCP port 1433
  • Explicitly force encryption in connection string
  • Explicitly chose to not trust server certificate in connection string

Please note that many (if not all) ISPs (Internet Service Providers) and Hosters, as well as IT staff within companies DO block outgoing TCP Port 1433 due to the SQL Slammer worm. This outgoing port blocking appears to be one of the most faced issues of newcommers to SQL Azure.

UPDATE Nov. 2015

As of August 2015, there is preview feature that enables you to use Azure AD to authenticate to Azure SQL Database. You can read more on this new preview feature here: https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/