where to change the Database connection settings in Orchard MVC CMS

六眼飞鱼酱① 提交于 2019-12-03 14:45:07

问题


i set up a site in orchard cms.while choosing data storage settings i choose "used an existing SQL Server(or SQL Express) database" option instead of "used built-in data storage(SQL Server compact)".its 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.

any help would be greatly appreciated. thanks.


回答1:


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, an 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.




回答2:


.\App_Data\Sites\Default\settings.txt

but you can't just change it to point to a empty database. the database needs to be prepared for orchard cms first.




回答3:


Take a look at .\App_Data\Sites\Default\settings.txt.




回答4:


To change connection string in Orchard you should go to Orchard.Web,in that App_Data\Sites\Default\Settings.Txt



来源:https://stackoverflow.com/questions/4781063/where-to-change-the-database-connection-settings-in-orchard-mvc-cms

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!