title: Migrated my C# application from one machine to another and there is some issue in connection string
body: <p>I changed my machine/laptop on which I was developing a C# application. The application was running without any SQL Server or connection based issues/problems. Now that I am continuing with the rest of development on the other machine. Although I was using the connection string like:</p>
  
  <pre><code>SqlConnection con = new SqlConnection("server=local; database=hospital; integrated security= true");
  </code></pre>
  
  <p>but now this connection string is not working and an exception is being shown as:</p>
  
  <blockquote>
    <p><em>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)</em></p>
  </blockquote>
  
  <p>I dont know what is this issue raised with. May be due to a new server name(but I am using "server=." which means that it will connect with the local server. Or there may be some issue with the installation of SQL Server 2008 R2 ). Help me out,Please!!!</p>