title: Cannot connect to remote SQL Server with SQL Server Management Studio with Visual Studio
body: <p>I'm developing a small app on my own and I am trying to install a database on a local machine that I will be using for development.</p>
  
  <p>So far I have done all of these things:</p>
  
  <ol>
  <li>Install SQL Server Management Studio;</li>
  <li>Created a server with name (fictious) is <code>MYCPU/SQLEXPRESS</code></li>
  <li>Created in it a database named <code>MYPROJECT1</code>and I have set the sizes as best as I could figure out</li>
  <li>Added in security a login user named <code>test</code> / <code>password</code>for connection tests;</li>
  <li>SQL Server configuration manager tells me that the SQL Server service is running, the SQL Server agent is stopper and the SQL Server Browser is running;</li>
  <li>Got the IP of my machine which will be (fictious) <code>254.254.254.123</code></li>
  <li>In windows firewall, I have added an Inbound Rule named SQL Server Port <code>9999</code> (9999 being the proper port which is supposed to be listened by the Server);</li>
  <li>I have a Linksys router and, on this router, in security tab, single port forwarding, I have a Remote Desktop connection with external / internal port routing to port 9999 with ip 254.254.254.123 and it is enabled;</li>
  <li>I have authorized TCP/IP protocol on my server.</li>
  </ol>
  
  <p>This resumes what I have done as best as I remember as I have tried many things. My objective is to connect to the <code>MYPROJECT1</code> using a connection string in visual studio; however I do not know how to format this connection string, so I am using a modified connection string took from another project which connects on a remote database which works (but is not located at home):</p>
  
  <pre><code>&lt;add name="MyDatabaseConnection" 
       connectionString="metadata=res://*/Models.Database.MYPROJECT1.csdl|res://*/Models.Database.MYPROJECT1.ssdl|res://*/Models.Database.MYPROJECT1.msl;provider=System.Data.SqlClient;provider connection string=&amp;quot;data source=254.254.254.123;initial catalog=MYCPU/SQLEXPRESS\MYPROJECT1;user id=test;password=password;MultipleActiveResultSets=True;App=EntityFramework&amp;quot;" 
       providerName="System.Data.EntityClient" /&gt;
  </code></pre>
  
  <p>However when I try to connect to this database, Visual Studio shows me the following error:</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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)</p>
    
    <p>The system cannot find the file specified</p>
  </blockquote>
  
  <p>I need help troubleshooting to find the exact cause of the problem and FINALLY connect to my database remotely, this would mean a lot to me. If you have any questions in the process or think that there is information missing, feel free to ask.</p>