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:
<connectionStrings>
<remove name="LocalMySqlServer"/>
<!-- <add name="ApplicationServices" connectionString="server=127.0.0.1;uid=root;pwd=mypass;database=MyDB" providerName="MySql.Data.MySqlClient" /> -->
<add name="ApplicationServices" connectionString="server=127.0.0.1;uid=root;pwd=mypass;database=MyDB" providerName="MySQL Data Provider" />
</connectionStrings>
<system.data>
<DbProviderFactories>
<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"
/>
</DbProviderFactories>
</system.data>
The user can login with "mypass" but whenever I actually connect to the database I get the following error:
"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)"
which indicates that I have a messed up configuration string as an attmpt is being made to a SQL Server using Named pipes.
Can anyone point me in the direction of a solution here please?