title: provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server 2012 express
body: <p>I was getting the below error when trying to connect to my SQLEXPRESS database using the Generate Database wizard of EF.</p>
  
  <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>I enabled the TCp/IP for SQLEXPRESS as per the below question.</p>
  
  <p><a href="https://stackoverflow.com/questions/11278114/enable-remote-connections-for-sql-server-express-2012">Enable remote connections for SQL Server Express 2012</a></p>
  
  <p>I just enabled the tcp/Ip settings(did'nt change the IP2 and all) and restarted the sql server process.</p>
  
  <p>After restarting the service my server is not being detected in connection properties dialog window. </p>
  
  <p>Why is this happening? What should I do now?</p>