Update Web.Config for Colectica Repository¶
Rename the
RepositoryDir\Web.config.template
file toWeb.config
.
Database Configuration¶
Since Colectica supports multiple databases, you must configure which database Colectica Repository will use.
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"/>-->
By default, the SQL Server configuration is uncommented and the PostgreSQL configuration is commented out.
Note
In XML, comments look
<!-- like this -->
.If you are using SQL Server as your database, you do not need to change this section.
If you are using PostgreSQL as your database, comment out the SQL Server line, and uncomment the PostgreSQL line.
Open the
RepositoryDir\Config\Repository.ConnectionStrings.ProviderName.config
file.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.
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"/>-->
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"/>
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">-->
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¶
In
RepositoryDir\Web.config
, find all instances oftest.colectica.com
, and replace this text with your actual hostname.
Certificate Name¶
In
RepositoryDir\Web.config
, find all instances ofCN=
, and ensure the text followingCN=
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.