More in this section
Forums / General Discussions / Connection string "Sitefinity" could not be found in config files.

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

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Jeff
    Jeff avatar
    6 posts
    01 Jun 2010
    14 Apr 2011
    Link to this post
    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?
  2. Tihomir
    Tihomir avatar
    23 posts
    09 Dec 2016
    15 Apr 2011
    Link to this post
    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).

    the Telerik team

2 posts, 0 answered