Configuration

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 年 前
Hello,

On uploading the nopcommerce on the host machine i receive the following error


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

Source Error:


[No relevant source lines]

Source File: machine.config    Line: 160

Regards
G.K
13 年 前
I got this same error just downloading a fresh copy of 1.5 with source code and trying to run it in Visual Studio. The manual says this should work and that it should just start the installation wizard.

Or do we need to set up the database and connection string first?
13 年 前
You dont have to recreate the database you just have to configure the connection string in connection.config
13 年 前
lubish,

You mean configure the connection string before running the install wizard?

thanks
13 年 前
configure the web.config and include the connection string info about your database which should be something as follows

<connectionStrings>
  <add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated
Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword"
providerName="System.Data.SqlClient" />
</connectionStrings>
13 年 前
I had the same problem with a web server with Parallels Plesk Interface (Plesk 8.2 for Windows) and I solve the problem:

1 - On Plesk interface go to ASP.NET Configuration. Click on Set to Default. Click OK.

2 - (optional) If you want check errors, change Custom error mode  to Off. Do the same on web.config file.

3 - On Plesk interface go to Web Directories. There exist also a ASP.NET Configuration, by default assume the changes you had made. So go to Preferences.
There check:
- Script source access
- Read permission
- Write permission
- Allow to use parent paths
- Allow application execution in MTA

Click OK to exit

4 - Change permissions to images folder (full control) to Plesk IIS User (IUSR_) and Plesk IIS WP User (IWAM_plesk)

5 - Now edit web.config file and find:
      <providers>
         <add name="NopRoleManagerSqlProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreRoleProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" applicationName="NopCommerce"/>
      </providers>

6 - Insert there <clear/> below <providers>:
      <providers>
        <clear/>
        <add name="NopRoleManagerSqlProvider" type="NopSolutions.NopCommerce.BusinessLogic.Profile.StoreRoleProvider, Nop.BusinessLogic" connectionStringName="NopSqlConnection" applicationName="NopCommerce"/>
      </providers>

7 - Now you are ready to roll: create database, install skiping "permissions", and in step 3 change your connectionStrings.config file:

<add name="NopSqlConnection" connectionString="Data Source=195.??.??.??;Initial Catalog=DATABASENAME;Integrated Security=False;Persist Security Info=False;User ID=USERNAME;Password=PASSWORD;Connect Timeout=120"/>


8 - After you finish the installation, change email admin and password, and click go to store. If you are redirect to the install page... then goto to Step 1 and remove the Default Connection strings from the ASP.NET Configuration page.

Good luck
Bento
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.