Connection string "Sitefinity" could not be found

Posted by Community Admin on 03-Aug-2018 21:32

Connection string "Sitefinity" could not be found in config files.

All Replies

Posted by Community Admin on 14-Apr-2011 00:00

I need to be able to protect the connection string from being accessible through the backend UI.  So long as it's in the DataConfig.config, it can be accessed by downloading the actual file under Administration -> Files or be viewed by going to Administration -> Settings under Data -> Connection Strings in the Advanced view.

As a result, I explored moving the connection string to the web.config and found that so long as it's named "Sitefinity" and there aren't any connection strings in the DataConfig.config, then that connection string will be used.  Unfortunately, the web.config may also be downloaded from Administration -> Files.

I've also tried putting it in the machine.config and found that the application works and prevents the UI from being able to access it.  However, because it's in such a global location and we may have multiple Sitefinity applications on the same box, I'd now like to rename the connection string from "Sitefinity" to something more specific to the application.  Is there a value I can change to cause Sitefinity to look for a different connection string?

Posted by Community Admin on 15-Apr-2011 00:00

Hello Jeff,

At this moment one is not able to change the name of the connection string, so it is not possible to have several connection strings within the machine.config file. We are discussing adding configuration variable for the name of the used connection string in future versions of the product(probably for the Q3 release).
Proper solution to your problem is to simply change sitefinity's backend permissions, so one to be not able to access  'Administration -> Files' and/or 'Administration -> Settings under Data -> Connection Strings', whether you are storing the connection string in the web.config file or in the DataConfig.config file.
On my opinion is much more easier/effective  to put the connection string in the web.config and then to change the permission of the Files page. You just need to open 'Administration -> Backend pages', to find the Files page, to click on the 'Actions -> Permissions'  and finally to configure the needed permissions properly(probably you will need to configure only the page's view permissions).

Regards,
Tihomir
the Telerik team


This thread is closed