title: Connect Azure Cloud Service in Virtual Network to Azure SQL database
body: <p>I have an Azure Cloud Service (Worker Role) that needs to connect to my Azure SQL database and also connect to an external database.</p>
  
  <p>In development the external database was on the public Internet and connectivity was not a problem.</p>
  
  <p>However, the solution now needs to be deployed in a production environment and access to the external database is to be restricted by setting up a Virtual Network.</p>
  
  <p>The Cloud Service, when deployed in the Virtual Network, gets an IP from the subnet, but seems to become inaccessible to the outside world, and is not connecting to the Azure SQL database (I also cannot RDP to it).</p>
  
  <p>This seems to be beyond my level of understanding of networking, but I don't see why it should lose access to its neighbours in the Azure environment.</p>
  
  <p>What am I missing? Do I need to get involved with Endpoints? Is the Virtual Network misconfigured?</p>
  
  <p>Thanks in advance.</p>