title: mySQL Entity Framework 4.1 Code First ASP.NET connection problem
body: <p>I have an ASP.NET webforms application with the following Web.config entries so that I can connect to a mySQL database running on the local host:</p>
  
  <pre><code>  &lt;connectionStrings&gt;
      &lt;remove name="LocalMySqlServer"/&gt;
      &lt;!-- &lt;add name="ApplicationServices" connectionString="server=127.0.0.1;uid=root;pwd=mypass;database=MyDB" providerName="MySql.Data.MySqlClient" /&gt; --&gt;
      &lt;add name="ApplicationServices" connectionString="server=127.0.0.1;uid=root;pwd=mypass;database=MyDB" providerName="MySQL Data Provider" /&gt;
    &lt;/connectionStrings&gt;
  
    &lt;system.data&gt;
      &lt;DbProviderFactories&gt;
        &lt;add
            name="MySQL Data Provider"
            invariant="MySql.Data.MySqlClient"
            description=".Net Framework Data Provider for MySQL"
            type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,
                    Version=6.4.3.0, Culture=neutral,
                    PublicKeyToken=c5687fc88969c44d"
          /&gt;
      &lt;/DbProviderFactories&gt;
    &lt;/system.data&gt;
  </code></pre>
  
  <p>The user can login with "mypass" but whenever I actually connect to the database I get the following error:</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>which indicates that I have a messed up configuration string as an attmpt is being made to a SQL Server using Named pipes. </p>
  
  <p>Can anyone point me in the direction of a solution here please?</p>