Database Setup

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
Hi all,

I am trying to setup a NopCommerce app, I am using the latest version, 4.5 with source code.
I am following the general steps and creating the database from the UI and it works perfectly, but if I want to change that database connection, I don`t know from where to do it. I went though the documentation and the only thing is days is the following:
"If you want to completely reset a nopCommerce site to its default settings, you can delete the ConnectionStrings section from the appsettings.json (or dataSettings.json for earlier versions) file located in the App_Data directory. You can even delete this whole file but note that in this case, it will be recovered on the next run with default values, so you can lose your settings."

Unfortunately in the skeleton of the application in this directory, there is no such file.

My main goal is to create a dynamic variable and replace dynamically its value as part of the deployment process. Again, I don`t want it to happen from the UI or the Admin section.

Thanks!
1 year ago
The connection string is now in App-Data\appSettings.json
The file is created when running the Install
1 year ago
Hi back,

Thank you for your answer!
This is what I see in my Solution explorer:
https://pasteboard.co/AZeNgVNQLqhB.png
1 year ago
Pleaes click into show all file

https://prnt.sc/26fOZ6rSJlIr

You will find database settings file.
1 year ago
yoanna.kostova wrote:
...My main goal is to create a dynamic variable and replace dynamically its value as part of the deployment process...

You need to consider that the deployed folder structure ("no source") differs a bit compared to Visual Studio project.  The App_Data folder is at the root of your site.
1 year ago
[email protected] wrote:
Pleaes click into show all file

https://prnt.sc/26fOZ6rSJlIr

You will find database settings file.


Thank you very much! Exactly what I was looking for!
1 year ago
New York wrote:
...My main goal is to create a dynamic variable and replace dynamically its value as part of the deployment process...
You need to consider that the deployed folder structure ("no source") differs a bit compared to Visual Studio project.  The App_Data folder is at the root of your site.


I am using the solution with source code.
This is one of the things I was wondering about as an approach. Is it better to use the structure that NopCommerce gives in the Admin section or is it better to use dynamic variables and replace their value during the deploy process with a pipeline. My main concern is that it is very sensitive data.
1 year ago
I recommend that you replace the value "during the deploy process with a pipeline."
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.