More in this section
Forums / Sitefinity SDK / How to change database connection in a custom module

How to change database connection in a custom module

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. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    23 Feb 2011
    Link to this post
    Hi,

    The App.config file of the custom module contains the database connection settings as follows by default.

     
    <connections>
         <connection id="DatabaseConnection1">
           <databasename>Database1</databasename>
           <servername>(local)\SQLEXPRESS</servername>
           <integratedSecurity>True</integratedSecurity>
           <backendconfigurationname>mssqlConfiguration</backendconfigurationname>
         </connection>
       </connections>

     

    The above works on a SQL Express instance with Windows Auth. But now I need to change this to install the module on a database on a different server with SQL Authentication. There is a SQL login created with full access to that perticular database instance. Can someone tell me the complete <connections/> block i need to have in the config file of my module to achieve this?

    Thanks,
    Duneel

  2. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    23 Feb 2011
    Link to this post
    Hi Duneel,

    if i correctly understand custom module you have nothing to do for connection settings, in fact the module use by default Sitefinity connection in DataConfig.config.

    In my case, I just edit servername and databasename and it works nevertheless it's a database with authentification.

    Regards,

    Nicolas
2 posts, 0 answered