Where is Database connection string/ Settings.txt on nopCommerce3.5

5 years ago
I have installed nopCommerce 3.5 with sample data, installation gone well , it is up running, database created with sample data but then the most asked question is where is database connection string is ? as  I was looking in the net and it should be under App_Data/Settings.txt file but in my case there is no setting.txt file exist.

I had a search on entire solution with settings.txt and I have fount the results below

under Libraries/Nop.core/Data/ DataSettingsManager.cs
1. a string constant :   protected const string filename = "Settings.txt";
2.   //use webHelper.MapPath instead of HostingEnvironment.MapPath which is not available in unit tests
      filePath = Path.Combine(MapPath("~/App_Data/"), filename);

3. under App_Data
  a. Install (folder)
  b. Localization (folder)
  c. Pdf (folder)
  d. GeoLite2-Country.mmdb (file)
  e. uas_20140809-02.ini (file)

Help me to fimnd Database connection setting string on nopCommerce 3.5

Thanks in advance.
5 years ago
5 years ago

Thanks for your response, but I cant see any file called App_Data/Settings.txt, why is that?

5 years ago
No Setting.txt under Presentation/Nop.Web/App_Data/Settings.txt

nopCommerce 3.5

5 years ago
You need to copy it from your development environment
5 years ago
Hi Craig

Thanks for your response but I am in  development environment installed on localhost. where that should be from?

please find the details below

I have installed nopCommerce 3.5 on visual studio 2010 but after a successful configuration i could not find any database connection string file which should be under Nop.Web/App_Data/Settings.txt. so there is no Settings.txt file in my project at all and I am using MSSql 2012, Database has been created as expected including sample data. so where is my database connection string please?

5 years ago
Just create a file called "Settings.txt" in App_Data and copy the following 2 lines in it. You need to modify the connection string to suit your environment. I have replaced my details with capitals.

DataProvider: sqlserver
DataConnectionString: Data Source=SERVER_NAME\DB_INSTANCE;Initial Catalog=YOUR_DB_NAME;Integrated Security=True;User ID=USERNAME;Password=PASSWORD;MultipleActiveResultSets=True
5 years ago
I have just had the exact issue, not being able to find settings.txt and wondering if it had been moved to web.config or something more usual.

What you need to do is highlight presentation > nop.web > App_Data and then click show all files in the solution explorer. there you will see Setting.txt . Right click it and select include in project and you are good to go.

Hope this helps
5 years ago
RE: "include in project "
Be careful.. depending on how you Publish, you could overwrite your host copy
5 years ago
Select "Show All Files" in Solution Explorer and you should be able to see Settings.txt