title: Connecting to SQL Server using windows authentication
body: <p>When I was trying to connect to SQL Server using the following code:</p>
  
  <pre><code>SqlConnection con = new SqlConnection("Server=localhost,Authentication=Windows Authentication, Database=employeedetails");
  con.Open();
  SqlCommand cmd;
  string s = "delete employee where empid=103";
  </code></pre>
  
  <p>I get 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: SQL Network Interfaces, error: 25 - Connection string is not valid)</p>
  </blockquote>