title: Azure connection string exception "network-related orinstance-specific error occurred"
body: <p>When attempting to connect to SQL Azure with the following connection string </p>
  
  <blockquote>
    <p>Server=tcp:SERVER.database.windows.net,1433;Database=DBNAME;User ID=USER@SERVER;Password=PASSWORD;Trusted_Connection=False;Encrypt=True</p>
  </blockquote>
  
  <p>from a locally running ASP.NET MVC application I receive this exception:</p>
  
  <blockquote>
    <p>{"A network-related or
    instance-specific error occurred while
    establishing a connection to SQL
    Server. The server was not found or
    was not accessible. Verify that the
    instance name is correct and that SQL
    Server is configured to allow remote
    connections. (provider: TCP Provider,
    error: 0 - No such host is known.)"}</p>
  </blockquote>
  
  <p>I realize this is a relatively generic error message.</p>
  
  <p>In troubleshooting the problem I have opened inbound and outbound traffic through my Windows firewall on port 1433:</p>
  
  <blockquote>
    <p>netsh advfirewall firewall add rule name=”Open Port 80” dir=in action=allow protocol=TCP localport=80</p>
  </blockquote>
  
  <p>I have configured the Azure firewall to accept connections from my IP address as well to "Allow other Windows Azure services to access this server." I <em>can</em> connect to the Azure database via SQL Server Management Studio 2008 R2. I <em>cannot</em> telnet to the database via</p>
  
  <blockquote>
    <p>telnet SERVER.database.windows.net 1433</p>
  </blockquote>
  
  <p>Related Stack Overflow Questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/q/1605303/61654">Problem while connecting to cloud database</a></li>
  <li><a href="https://stackoverflow.com/q/5066347/61654">SQL Azure : Connection to SQL Azure throws exception</a></li>
  </ul>
  
  <p>I feel like I must be overlooking something basic. Are there other troubleshooting steps I have missed?</p>