Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where to change the Database connection settings in Orchard MVC CMS

Tags:

orchardcms

I set up a site in Orchard CMS. While choosing data storage settings I chose

Use an existing SQL Server(or SQL Express) database

Instead of

Use built-in data storage(SQL Server compact)

It has worked fine for me but I am wondering where to change the data source that is the database server name. I didn't find the connection string settings in web.config file.

like image 302
waqari Avatar asked Jan 24 '11 10:01

waqari


1 Answers

To change the database, you should edit the DataConnectionString entry in the App_Data\Sites\Default\settings.txt file.

It should look something like this:

Name: Default DataProvider: SqlServer DataConnectionString: Data Source=servername;Initial Catalog=dbname;User Id=username;Password=password; 

You do need to restart the website after the change is made. If you can't reset the webserver yourself, edit in the web.config (add a space) or in the bin directory should suffice. .NET resets the website when something happens in this file or folder.

like image 69
Jan_V Avatar answered Sep 28 '22 01:09

Jan_V