SoftwareCentral · Untrusted domain support

Installing SoftwareCentral in the untrusted domain

Users in a domain without trust to the SoftwareCentral database cannot use the main installation, because it relies on Windows Authentication. This page covers the second installation that serves them, and the SQL login it uses to reach the existing database.

Second installation SQL login Connection screen

1 Why a second installation is needed

Users in an untrusted domain cannot access a normal SoftwareCentral installation, because SoftwareCentral relies on Windows Authentication. An extra installation of SoftwareCentral is therefore required in the untrusted domain.

The second installation is a normal installation. It uses the same SoftwareCentral database as the main installation, so the users in the untrusted domain see the same data.

Set up the domains first Before you install here, add the untrusted domain in the trusted domain and set its trust and service account. See Configuring SoftwareCentral with an untrusted domain.

2 Install the second site

Install SoftwareCentral in the untrusted domain as you would any other installation, and point it at the existing SoftwareCentral database.

The database connection is kept in the ConnectionString.xml file of the SoftwareCentral installation. You do not have to edit that file by hand: the Connection screen writes it when you save (see section 3). If the installation has no working database connection, SoftwareCentral opens the Connection screen by itself on the first visit.

3 Connect with a SQL login

The database and the new installation are in two domains without trust between them, so Windows Authentication cannot reach the database. A SQL login is required.

StepWhat to do
1Create a SQL login and grant it read, write and execute permissions on the SoftwareCentral database.
2Open the Connection screen. On the first visit it opens by itself. Later, open Settings › General Settings › Server Configuration and click Open SoftwareCentral Database Settings.
3Enter the SoftwareCentral Database Server Name and the SoftwareCentral Database Name.
4Untick Trusted Connection. It is ticked by default. The SQL User (Only needed if untrusted) and SQL Password (Only needed if untrusted) fields become active. Enter the SQL login and its password.
5Click Test Connection. When the connection works, the page shows "Successfully connected to database" with the database and server names.
6Click Save. The password is stored encrypted.

The connection string has this form. Replace the example values with your own server, database and login:

Server=SQL01.contoso.com;Database=SoftwareCentral;User=SWCSqlLogin;Password=<encrypted password>

You do not type the encrypted password yourself. The Connection screen encrypts the password when you click Save, so no separate encryption tool is needed.

Only the database connection needs the SQL login The login is for the SoftwareCentral database. Users in the untrusted domain can now access the new site.

4 Best practice

  • Give the SQL login rights on the SoftwareCentral database only, as in step 1. The connection string names this one database, so the login has no need for more.
  • Set up the untrusted domain in the trusted domain first. Each domain needs its trust setting and service account in Settings › Domain › Domains. Without them the second site cannot reach the computers in that domain.
  • Click Test Connection before you leave the Connection screen. It checks the values you have typed, so you find a wrong login or password before users do.
  • Type the SQL password only in the Connection screen. It is saved encrypted. Do not keep it in a note or a text file.
  • Keep Windows Authentication enabled for the new site in IIS. SoftwareCentral identifies the signed-in user with it, so the site will not work for users without it.

5 Troubleshooting

SymptomCauseWhat to do
SoftwareCentral opens the Connection screen when you visit the siteNo working database connection is saved yet.Complete steps 3 to 6 in section 3 and click Save.
"Failed to connect to database." with a message after it (after Test Connection)The server or database name is wrong, the SQL login or password is wrong, or the login has no rights on the database. The text after "Message:" is the SQL error.Check the server and database names. Type the SQL user and password again. Check the login's rights on the SoftwareCentral database, then click Test Connection again.
"Username is missing."Trusted Connection is unticked and the SQL User field is empty.Type the SQL login in SQL User (Only needed if untrusted).
"Password is missing."Trusted Connection is unticked and the SQL Password field is empty.Type the password of the SQL login.
"Server name is missing."The SoftwareCentral Database Server Name field is empty.Type the name of the database server.
An entry "Failed to save Connection String." in the logThe connection could not be saved. The log entry gives the reason.Open the log entry, correct the reason, and click Save again.