While working with SQL server on Azure I had multiple occasions where the communication to the SQL server has been severed.
I have started to use this tool: "Tools-ConnectionStringTester"
In order to prove the communication working ensure you have updated Tester.exe.config and replaced all variables.
Replace "MyDatabaseName" in my config with my real database I want to test against
<add name="ConnectionStringUnderTest" connectionString="Data Source=localhost;Initial Catalog=MyDatabaseName;Integrated Security=True" />
Here you can find some additional connection string sources and syntax
If I need to adjust connection string timeout I can using the following configuration
<add key="CommandTimeOut" value="90"/>
<add key="SqlCommand" value="select count(*) from (select * from dbo.TestingTable) as underTest" />
Finally here is the full config and how it should look like