Admin-Ahead Community

Windows => Control Panels => Plesk => Topic started by: jominj on January 04, 2014, 02:23:08 pm

Title: "Connection name 'LocalSqlServer' was not found" error when try to browse domain
Post by: jominj on January 04, 2014, 02:23:08 pm
Getting "Connection name 'LocalSqlServer' was not found" error when try to browse domain in browser
Code: [Select]
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

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