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.DatabaseName.config file.

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

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
    -->
    <!-- If using Membership authentication, include the correct config for your database -->
    
    <!-- Uncomment the following two lines for SQL Server -->
    <!--<membership configSource="Config\Membership.SqlServer.config"/>
        <roleManager configSource="Config\RoleManager.SqlServer.config"/>-->
    
    <!-- Uncomment the following two lines for PostgreSQL -->
    <!--<membership configSource="Config\Membership.Postgres.config"/>
        <roleManager configSource="Config\RoleManager.Postgres.config"/>-->
    
  2. By default, configuration for both SQL Server and PostgreSQL are commented out.

  3. If you are using SQL Server as your database, uncomment these lines:

    <!-- Uncomment the following two lines for SQL Server -->
    <membership configSource="Config\Membership.SqlServer.config"/>
    <roleManager configSource="Config\RoleManager.SqlServer.config"/>
    
  4. If you are using PostgreSQL as your database, uncomment these lines:

    <!-- Uncomment the following two lines for PostgreSQL -->
    <membership configSource="Config\Membership.Postgres.config"/>
    <roleManager configSource="Config\RoleManager.Postgres.config"/>
    
  5. 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"/>-->
    
  6. By default, the WindowsAuth (ActiveDirectory) configuration is uncommented, and the UsernameAuth (Colectica-managed authentication) is commented out.

  7. If you are using Colectica-managed authentication, 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"/>
    

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.