"Connection name 'LocalSqlServer' was not found" error when I try to browse domain

Created:

2016-11-16 12:51:04 UTC

Modified:

2017-04-24 11:24:07 UTC

0

Was this article helpful?


Have more questions?

Submit a request

"Connection name 'LocalSqlServer' was not found" error when I try to browse domain

Applicable to:

  • Plesk 10.4 for Windows
  • Plesk 11.5 for Windows

Symptoms

Domain shows the following error when you try to browse it in Internet explorer:

    Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.

Source Error:
Line 255: <roleManager>
Line 256: <providers>
Line 257: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=34657f7f11d50a3a" />
Line 258: </providers>

Source File: C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\Config\\machine.config Line: 257

Cause

The LocalSqlServer connection string is not defined in Machine.config.

Resolution

  1. Make a copy of the file C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config

  2. Open this file in notepad.exe and find string that begins from . It should look similar to example:

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

If you see that there is no connection string tag in machine.config, try to add it similar to example above and check domain again.

Have more questions? Submit a request
Please sign in to leave a comment.