Can anybody help with the following message when running a fresh install version of nopCommerce 1.20. This is on an ASP.Net 3.5 enabled host running IIS.
Regards, Andrew
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 144: <roleManager> Line 145: <providers> Line 146: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> Line 147: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> Line 148: </providers>
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Hello, Have you changed your connection string in ConnectionStrings.config? Provide your connection string in this file ConnectionStrings.config. Hope it helps you.
The install wizzard should create the connection string as part of the install. If I specify it prior to the install, it will only find an empty database.
The problem appears to be the host as it refers to LocalSQLServer in the MachineConfig.config file, when it probably needs to refer to the IP of the SQL Server.
Thanks. I have tried that (created blank database and then run the appropriate scripts); hence I have a database that I can reach (via Access & SQL Server Management Studio).
However, as soon as I try to run nopCommerce I get the same message:
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 144: <roleManager> Line 145: <providers> Line 146: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> Line 147: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> Line 148: </providers>
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config Line: 146 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
This suggests to me a hosting issue becuase nopCommerce can not find the SQL Server, hence locals for the LocalSQLServer specified in the MachineConfig.config file.
You are right that the machine.config is being used, but nop is not looking for this. Is the IIS set up properly i.e nop is being run as a application?
I have never come across this problem before, but you can remove 'AspNetSqlRoleProvider' and 'AspNetWindowsTokenRoleProvider' from the machine.config as nop does not need or reference these providers and then try and run the application.
This issue will be fixed in the next release. One of the solutions is: Open ConnectionString.config file. Add new connection element with "LocalSQLServer" name. Your ConnectionString.config file should be something like: