Are you trying to do an "Install". You should not if "Install nopCommerce on Existing DB". As per above, just modify connection string to point to existing DB.
I've been looking into using nopcommerce for demos during .Net related training workshops, as it is much more appealing than the "Hello World" examples :).
I started from the Dev version in Visual Studio, running it local and works fine, after completing the database install step (pointing to a Azure SQL resource).
when I then publish the source code to Azure Web Apps, it starts again with the install step. If I point to the existing Azure SQL resource, it errors out with
Setup failed: Sequence contains more than one element
seems like more users are complaining about this behavior. I wouldn't mind having it create a new database and running a restore from SQL, but feels weird since all settings remain the same.
I've been looking into using nopcommerce for demos during .Net related training workshops, as it is much more appealing than the "Hello World" examples :).
I started from the Dev version in Visual Studio, running it local and works fine, after completing the database install step (pointing to a Azure SQL resource).
when I then publish the source code to Azure Web Apps, it starts again with the install step. If I point to the existing Azure SQL resource, it errors out with
Setup failed: Sequence contains more than one element
seems like more users are complaining about this behavior. I wouldn't mind having it create a new database and running a restore from SQL, but feels weird since all settings remain the same.
thanks for helping, Peter
Did you uncheck Create database if not exist while installing?
yes I did check, and both settings are off (create sample data and create db if not exist).
it still results in the error.
When checking the back-end, i noticed, during the first connection to the webapp URL, the datasettings.json gets reset, resulting in empty connection settings. If I edit the datasettings.json by pasting in the connection string info again, save it and reload the webapp using <url>/login, it works.
So this could be a valid workaround for my lab / demo scenarios.
However, I'm also considering moving the app into a Docker container from Visual Studio, which would making this file overwrite a harder process.
This is an existing issue with nopCommerce. We tried to do this several times but every time it fails. When you try to install nopCommerce on an existing database, it never installs. We need to do that manually by providing existing database connection string in dataSettings.json file under App_Data.
I've seen the same. Trying to dockerize my existing install and it's been a real pain since the existing containers don't expose the App_Data directory so it isn't as simple as just "editing the connection string" since you don't have access to it.
Very annoying.
What I've been doing as a workaround:
1. Take SQL Backup 2. Drop Database 3. Do Fresh Install 4. Input connection string you want, let it create a new database. 5. Restore over created database.
This should get you working.
I'm not sure the checkbox is working to not create the database.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.