Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configu

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
OK...

I am getting the same configuration error many others have talked about.  However, none of the resolutions seem to apply to me.

The error is:
*******************************************************************************************

Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

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

Source Error:


Line 281:            <providers>
Line 282:                <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/"
Line 283:                    type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Line 284:                <add name="AspNetWindowsTokenRoleProvider" applicationName="/"
Line 285:                    type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />


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


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1


************************************************************************

1. I have my ConnectionStrings.config file setup
2. There is no LocalSqlServer anything in my web.config
3. nopCommerce 1.60 worked fine at this same hosted URL
3. this nopCommerce (v1.80) works fine on my local machine (connecting to the hosted SQL server)

ANY HELP IS APPRECIATED!

Kevin
13 years ago
Serveral people have stated "Add <clear /> to the provider", but never told us which provider; ASP.NET has hundreds of providers.  Well...

HERE IS THE SOLUTION:

The provider you need to add "<clear />" to is the provider within the "roleManager" tag inside your web.config file.

This is what it is before the fix:

<roleManager enabled="true" cacheRolesInCookie="false" defaultProvider="NopRoleManagerSqlProvider" cookieName=".NopCommerceRoles" cookiePath="/" cookieTimeout="30" cookieRequireSSL="false" cookieSlidingExpiration="true" createPersistentCookie="false" cookieProtection="All">
      <providers>
        <add name="NopRoleManagerSqlProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreRoleProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" applicationName="NopCommerce"/>
      </providers>
    </roleManager>

This is it AFTER the fix (this resolves the issue):
<roleManager enabled="true" cacheRolesInCookie="false" defaultProvider="NopRoleManagerSqlProvider" cookieName=".NopCommerceRoles" cookiePath="/" cookieTimeout="30" cookieRequireSSL="false" cookieSlidingExpiration="true" createPersistentCookie="false" cookieProtection="All">
      <providers>
        <clear/>        <add name="NopRoleManagerSqlProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreRoleProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" applicationName="NopCommerce"/>
      </providers>
    </roleManager>
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.