Update Web.Config for Colectica Repository

  1. Rename the RepositoryDir\Web.config.template file to Web.config.

Database Configuration

Since Colectica supports multiple databases, you must configure which database Colectica Repository will use.

  1. In RepositoryDir\Web.config, find the section that looks like:

    <!--
         CONNECTION STRINGS
    -->
    <!-- Select correct database connection. CHANGE the connection string in the included file -->
    <connectionStrings configSource="Config\Repository.ConnectionStrings.SqlServer.config"/>
    <!--<connectionStrings configSource="Config\Repository.ConnectionStrings.Postgres.config"/>-->
    
  2. By default, the SQL Server configuration is uncommented and the PostgreSQL configuration is commented out.

    Note

    In XML, comments look <!-- like this -->.

  3. If you are using SQL Server as your database, you do not need to change this section.

  4. If you are using PostgreSQL as your database, comment out the SQL Server line, and uncomment the PostgreSQL line.

  5. Open the RepositoryDir\Config\Repository.ConnectionStrings.ProviderName.config file.

  6. Edit the two connection strings as appropriate, especially ensuring your database password is correct.

Connection Strings

To configure which database Colectica Repository uses, you can edit the connection strings. These are configured in the Repository.ConnectionStrings.ProviderName.config file.

ColecticaRepository - ConnectionString

The full connection string of the Colectica Repository database.

Example Connection Strings: SQL Server

<add name="ColecticaRepository"
  connectionString="Server=.; Initial Catalog=colectica; Integrated Security=SSPI;"
  providerName="System.Data.SqlClient"/>

Example Connection Strings: PostgreSQL (v5.3.6233 and later)

<add name="ColecticaRepository"
   connectionString="Host=localhost;Database=colectica;Username=postgres;Password=Postgres1234;"
   providerName="Npgsql"/>

Example Connection Strings: PostgreSQL (Prior to v5.3.6233)

Note

The Postgres provider changed User ID to Username in a later release.

<add name="ColecticaRepository"
  connectionString="User ID=postgres;Password=Postgres1234;Host=localhost;Port=5432;Database=colectica;"
  providerName="Npgsql"/>

Authentication

If you are using ActiveDirectory for authentication, you can skip this section and refer to Configure Active Directory.

If you are using Colectica to manage authentication, follow these instructions to configure the authentication database.

  1. In RepositoryDir\Web.config, find the section that looks like:

<!--
    AUTHENTICATION
-->
<!-- Select the binding based on your authentication method -->
<bindings configSource="Config\Bindings.WindowsAuth.config"/>
<!--<bindings configSource="Config\Bindings.UsernameAuth.config"/>-->
  1. By default, the WindowsAuth (ActiveDirectory) configuration is uncommented, and the UsernameAuth (Colectica-managed authentication) is commented out. Comment out the WindowsAuth line and uncomment the UsernameAuth line, so the section looks like this:

<!--
    AUTHENTICATION
-->
<!-- Select the binding based on your authentication method -->
<!-- <bindings configSource="Config\Bindings.WindowsAuth.config"/>-->
<bindings configSource="Config\Bindings.UsernameAuth.config"/>
  1. Find the section that looks like:

<!--
    SERVICE BEHAVIOR
-->
<!-- Select the behaviorConfiguration based on your authentication method -->
<service name="Algenta.Colectica.Repository.RepositoryService" behaviorConfiguration="RepositoryService.WindowsAuth.Behavior">
<!--<service name="Algenta.Colectica.Repository.RepositoryService" behaviorConfiguration="RepositoryService.UsernameAuth.Behavior">-->
  1. Comment out the WindowsAuth Behavior line and uncomment the UsernameAuth Behavior line, so the section looks like this:

<!--
    SERVICE BEHAVIOR
-->
<!-- Select the behaviorConfiguration based on your authentication method -->
<!--<service name="Algenta.Colectica.Repository.RepositoryService" behaviorConfiguration="RepositoryService.WindowsAuth.Behavior">-->
<service name="Algenta.Colectica.Repository.RepositoryService" behaviorConfiguration="RepositoryService.UsernameAuth.Behavior">

Hostnames

  1. In RepositoryDir\Web.config, find all instances of test.colectica.com, and replace this text with your actual hostname.

Certificate Name

  1. In RepositoryDir\Web.config, find all instances of CN=, and ensure the text following CN= is the correct name of your certificate.

Note

You can change the search type to FindBySubjectName for a more lenient search for a certificate with multiple claims.