Author:  Marnel Catlett

From time to time you may run into connection errors.  These are explained in another article, however, as part of that step you may need to update the config file.  Depending on the reason for the connection error, one or all of the following properties may need to be updated.

Please note - All examples are based on our Demo data.  Any similarities are purely coincidental.



How to update the Config file


To start:

  • If the service is installed then you will need to amend the Config file that stores the credentials. This file is located in the folder where the Cognition360 service was installed. 
  • For each section, replace the value with the correct value in the "placeholder" as indicated on each section.
  • Please note:  Curly Brackets are used as an indication of the section that needs to be replaced and should be omitted in the final document.


Step 1: Incorrect SQL ServerName

  • In the first few lines of the Config File you will see a section called <connectionStrings>. Replace the value in the example below "{SQL ServerName}" with the correct details. 


Example of the Config file text (in the relevant area)  *Curly Brackets {} are omitted

<connectionStrings>

    <add name="CWManageConnectionString" connectionString="Data Source={SQLServerName}; Initial Catalog=cwwebapp_{companyinitial};User ID={SQLUserName};Password={SQLPassword}" providerName="System.Data.SqlClient" />

  </connectionStrings>

  • Example of config with field highlighted.


 

Step 2: Incorrect Database Name (ConnectWise Database) 

  • In the first few lines of the Config File you will see a section called <connectionStrings>.  The "initial catalog" string starts with "cwwebapp_" if this is not the case for you, please correct this.  Replace the value in the example below "{companyinitial}" with the correct details.


Example of the Config file text (in the relevant area)  *Curly Brackets {} are omitted

<connectionStrings>
<add name="CWManageConnectionString" connectionString="Data Source={SQLServerName}; Initial Catalog=cwwebapp_{companyinitial};User ID={SQLUserName};Password={SQLPassword}" providerName="System.Data.SqlClient" />
</connectionStrings>


  • Example of the Config file text (in the relevant area)  *Curly Brackets {} are omitted




Step 3: Incorrect Username

  • Just after the Database details you will find the SQL username field. Replace the value in the example below                 "{SQLUserName}" with the correct details.

Example of the Config file text (in the relevant area)  *Curly Brackets {} are omitted

<connectionStrings>
<add name="CWManageConnectionString" connectionString="Data Source={SQLServerName}; Initial Catalog=cwwebapp_{companyinitial};User ID={SQLUserName};Password={SQLPassword}" providerName="System.Data.SqlClient" />
</connectionStrings>

  • Example of config with field highlighted.



Step 4: Incorrect Password

  • Just after the Database details you will find the SQL username field. Replace the value in the example below                 "{SQLUserName}" with the correct details.


Example of the Config file text (in the relevant area)  *Curly Brackets {} are omitted

<connectionStrings>

    <add name="CWManageConnectionString" connectionString="Data Source={SQLServerName}; Initial Catalog=cwwebapp_{companyinitial};User ID={SQLUserName};Password={SQLPassword}" providerName="System.Data.SqlClient" />

  </connectionStrings>

  • Example of config with field highlighted.


Finally


Once done, return back to the Main article (https://support.cognition360.com/en/support/solutions/articles/69000805058-setup-errors-and-how-to-deal-with-them) to complete the final steps which are:

Save the Config File,

Stop the service

Restart the service, 

Let us know and we will check if data is again flowing.  support@cognition360.com or provisioning@cognition360.com




For queries, please contact support@cognition360.com