Connection name "LocalSqlServer" was not found in application configuration or connection string is empty

So, yesterday I installed PHP and MySQL on my development machine. Since then, I get the following error when trying to start one of my .NET projects:

The connection name "LocalSqlServer" was not found in the application configuration, or the connection string is empty.

It refers to this line of Machine.Config:

<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

I searched online, high and low, and I can confirm that my machine.config has the required connection string:

  <connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
<add name="LocalMySqlServer" connectionString="" />

Interestingly, I performed the same operation to install PHP and MySQL on my production server (server 2008), and there are no problems. My development machine is Windows 7.

- . machine.config ? - ?

Nugs

+5
1

, web.config -, :

<connectionStrings>
    <clear/>
    ...
</connectionStrings>

, machine.config. machine.configs Framework, 32- 64- .

+25

All Articles