code review tool administration guide - protium software

63
Code Review Tool Administration Guide http://codereviewtool.com Protium Software Page 1 of 63 http://protiumsoftware.com Code Review Tool Administration Guide Version 1.1 (4/21/2012 11:31:49 AM) Contents 1.0 Introduction .............................................................................................................................. 4 2.0 Installation Scenarios ................................................................................................................ 4 3.0 Installing .................................................................................................................................... 4 3.1 Pre-requisites ........................................................................................................................ 4 3.2 Launching Setup .................................................................................................................... 5 3.3 Setup Wizard ......................................................................................................................... 5 3.3.1 Welcome Step................................................................................................................. 5 3.3.2 EULA Step........................................................................................................................ 6 3.3.3 Setup Type Step .............................................................................................................. 7 3.3.4 Checking Pre-requisites Step .......................................................................................... 8 3.3.5 Database Name Step ...................................................................................................... 9 3.3.6 Database File Location Step ......................................................................................... 10 3.3.7 Database File Locations Step ........................................................................................ 11 3.3.8 Database Administrator Step ....................................................................................... 12 3.3.9 Web Site Name Step ..................................................................................................... 13 3.3.10 Web Site Directories Step ........................................................................................... 14 3.3.11 Web Application Step ................................................................................................. 15 3.3.12 Web Application Pool Name Step .............................................................................. 16 3.3.13 Web Application Pool Credentials User Name Step ................................................... 17 3.3.14 Web Application Pool Credentials Password Step ..................................................... 18 3.3.15 Web Site Binding Step ................................................................................................ 19 3.3.16 Web Site Binding Address Step .................................................................................. 20 3.3.17 Web Site Binding Certificate Step .............................................................................. 21 3.3.18 Web Application Upload Directory Step .................................................................... 22 3.3.19 Web Application Email Notification Step ................................................................... 23

Upload: others

Post on 03-Feb-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 1 of 63 http://protiumsoftware.com

Code Review Tool Administration Guide

Version 1.1 (4/21/2012 11:31:49 AM)

Contents 1.0 Introduction .............................................................................................................................. 4

2.0 Installation Scenarios ................................................................................................................ 4

3.0 Installing .................................................................................................................................... 4

3.1 Pre-requisites ........................................................................................................................ 4

3.2 Launching Setup .................................................................................................................... 5

3.3 Setup Wizard ......................................................................................................................... 5

3.3.1 Welcome Step ................................................................................................................. 5

3.3.2 EULA Step........................................................................................................................ 6

3.3.3 Setup Type Step .............................................................................................................. 7

3.3.4 Checking Pre-requisites Step .......................................................................................... 8

3.3.5 Database Name Step ...................................................................................................... 9

3.3.6 Database File Location Step ......................................................................................... 10

3.3.7 Database File Locations Step ........................................................................................ 11

3.3.8 Database Administrator Step ....................................................................................... 12

3.3.9 Web Site Name Step ..................................................................................................... 13

3.3.10 Web Site Directories Step ........................................................................................... 14

3.3.11 Web Application Step ................................................................................................. 15

3.3.12 Web Application Pool Name Step .............................................................................. 16

3.3.13 Web Application Pool Credentials User Name Step ................................................... 17

3.3.14 Web Application Pool Credentials Password Step ..................................................... 18

3.3.15 Web Site Binding Step ................................................................................................ 19

3.3.16 Web Site Binding Address Step .................................................................................. 20

3.3.17 Web Site Binding Certificate Step .............................................................................. 21

3.3.18 Web Application Upload Directory Step .................................................................... 22

3.3.19 Web Application Email Notification Step ................................................................... 23

Page 2: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 2 of 63 http://protiumsoftware.com

3.3.20 Web Application User Accounts Step ......................................................................... 24

3.3.21 Web Application Windows Authentication Step ........................................................ 25

3.3.22 Web Application Authentication Provider Step ......................................................... 26

3.3.23 Web Application Active Directory Authentication Step ............................................. 27

3.3.24 Web Application Roles Step ....................................................................................... 28

3.3.25 Web Application Administrator Step ......................................................................... 29

3.3.26 Web Application Administrator Credentials Step ...................................................... 30

3.3.27 Protect Configuration Step ......................................................................................... 31

3.3.28 Product Activation Step .............................................................................................. 32

3.3.29 Confirmation Step....................................................................................................... 33

3.3.30 Installation Status Step ............................................................................................... 34

4.0 Managing Users and Roles ...................................................................................................... 35

4.1 Sql User Authentication ...................................................................................................... 35

4.2 Active Directory User Authentication ................................................................................. 36

4.3 Windows User Authentication ............................................................................................ 37

4.4 CraConfig.exe Role Management ....................................................................................... 38

4.5 CraConfig.exe User Management ....................................................................................... 39

5.0 Licensing .................................................................................................................................. 39

6.0 Upgrading ................................................................................................................................ 40

7.0 Uninstalling ............................................................................................................................. 41

8.0 Advanced Configuration ......................................................................................................... 41

8.1 CodeReviewApplication Section ......................................................................................... 41

8.1.1 CoreConfig Element ...................................................................................................... 42

8.1.2 SearchConfig Element .................................................................................................. 45

8. 1.3 UIConfig Element ......................................................................................................... 46

8. 1.4 SourceControlManagers Element ............................................................................... 47

8. 1.5 Depots Element ........................................................................................................... 49

8. 1.6 TextFiles Element ......................................................................................................... 50

8. 1.7 CodeFormatters Element ............................................................................................ 50

Page 3: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 3 of 63 http://protiumsoftware.com

8. 1.8 Languages Element ...................................................................................................... 52

8.2 system.net/mailSettings/smtp Section ............................................................................... 53

8.3 connectionStrings Section ................................................................................................... 54

8.4 authentication Section ........................................................................................................ 55

8.5 membership Section ........................................................................................................... 55

8.6 roleManager Section ........................................................................................................... 55

8.7 trace Section ........................................................................................................................ 55

8.8 Section Encryption and Decryption ..................................................................................... 55

8.8.1 Decrypting Code Review Tool sections in web.config .................................................. 56

8.8.2 Encrypting Code Review Tool sections in web.config .................................................. 56

9.0 Client Installation and Upgrade .............................................................................................. 57

10.0 Automatic Review Creation for Team Foundation System Check-ins .................................. 57

10.1 Configuring TfsNotifier ...................................................................................................... 59

10.1.1 Services Configuration Section ................................................................................... 59

10.1.2 Plugins Configuration Section ..................................................................................... 59

10.1.3 TfsNotifier Configuration Section ............................................................................... 61

Page 4: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 4 of 63 http://protiumsoftware.com

1.0 Introduction

This guide describes how to administer Code Review Tool application. It explains how to install,

upgrade and uninstall Code Review Tool application. It also explains how to configure your

Code Review Tool installation.

2.0 Installation Scenarios

CodeReviewTool application can be installed in following ways:

Installation Type Details

Single Server Installation

In this scenario you have a single Windows Server with both IIS and SQL Server installed on it and you choose to install Code Review Tool on this server.

Separate Database and Web Application Installation

In this scenario you have two different Windows Servers with one server running IIS and other running SQL Server. You first install Code Review Tool database on the SQL Server. You then install Code Review Tool Web Application on IIS 7.0 Server and specify the Code Review Tool database server details for Web Application to connect to Code Review Tool database.

3.0 Installing

3.1 Pre-requisites

To install Code Review Tool Database you need the following:

1. SQL Server 2008 (or above) installed with File Streams and Full-Text Indexing support

2. You need Administrator privileges on the machine

3. You need Administrator privileges on the SQL Server instance

To install Code Review Tool Web Application you need the following:

1. Windows Server 2003 (or above) or Windows Vista SP2 (or above) or Windows 7

2. IIS 7.0 (or above)

3. You need Administrator privileges on the machine

Page 5: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 5 of 63 http://protiumsoftware.com

3.2 Launching Setup

Download the latest version of Code Review Tool distribution Zip package from

http://codereviewtool.com/download. Extract the zip to a temporary folder.

Execute “[Extracted Folder]\bin\SetupWizard.exe” to start the setup wizard.

3.3 Setup Wizard

Setup wizard allows you to install Code Review Tool Database and Web Application either

separately on different servers or together on a single server. Setup wizard has the following

steps:

3.3.1 Welcome Step

This step describes Code Review Tool setup.

Page 6: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 6 of 63 http://protiumsoftware.com

3.3.2 EULA Step

This step displays Code Review Tool product EULA. After reading the EULA, check the

acceptance checkbox to proceed further.

Page 7: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 7 of 63 http://protiumsoftware.com

3.3.3 Setup Type Step

This step provides you with following setup options:

Option Details

Install Database This option allows you to install Code Review Tool Database alone on a SQL Server.

Install Web Application and Activate Product

This option allows you to install Code Review Tool Web Application on a Windows Server with IIS 7.0. This also allows you to activate your installation with a product key.

Active Product This option allows you to activate your Code Review Tool installation alone with a product key.

Install Database, Web Application and Activate Product

This option allows you to install both Code Review Tool Database and Web Application on a single Windows Server with IIS and SQL Server. It also allows you to activate your Code Review Tool product with a product key.

Page 8: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 8 of 63 http://protiumsoftware.com

In case of single server installation select “All” option to install. In case of dual server

installation select “Database” option on SQL server. Rerun the installer again on Windows IIS

Server and select “Web Application” for installing web application.

3.3.4 Checking Pre-requisites Step

This step performs installation pre-requisite checking based on the type of setup selected in

“Setup Type” step and displays the results of tests to the user. You can only proceed further

when all the pre-requisites are met for the installation.

Page 9: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 9 of 63 http://protiumsoftware.com

3.3.5 Database Name Step

This step collects “Database Name” for Code Review Tool database.

Page 10: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 10 of 63 http://protiumsoftware.com

3.3.6 Database File Location Step

This step collects “Database Folder” location for Code Review Tool database.

Page 11: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 11 of 63 http://protiumsoftware.com

3.3.7 Database File Locations Step

This step collects following input for Code Review Tool database:

Input Details

Database Log Directory

The directory for Code Review Tool database log files. In large installation scenarios, for performance, it is generally better to specify a directory for log files which is different from database directory.

Full Text Database Directory

The directory for full text database files needed for search feature.

File Streams Directory

The directory for file streams of Code Review Tool database.

Page 12: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 12 of 63 http://protiumsoftware.com

3.3.8 Database Administrator Step

This step collects Windows account name which can login to SQL server and has administrator

privileges to create the Code Review Application database.

Page 13: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 13 of 63 http://protiumsoftware.com

3.3.9 Web Site Name Step

This step collects the name of the web site for Code Review Tool web application.

Page 14: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 14 of 63 http://protiumsoftware.com

3.3.10 Web Site Directories Step

This step collects following directories for web site for Code Review Tool web application:

Directory Details

Site Directory The directory for Web Site under which Code Review Tool Web Application needs to be installed.

Site Trace Directory

The directory for Code Review Tool Web Application IIS traces files.

Page 15: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 15 of 63 http://protiumsoftware.com

3.3.11 Web Application Step

This step collects following inputs for Code Review Tool web application:

Input Details

Application Name

The “virtual directory name” under Web Site for the Code Review Tool Web application. The default “/” works if you are creating a new web site for Code Review Tool Web application. If you are using an existing web site sharing it with other web applications, then you might want to specify a different virtual directory other than “/”.

Application Directory

The physical directory under which the Code Review Tool web application resides. This is generally the same as “Site Directory” in previous step if you are creating a new site for Code Review Tool application otherwise you specify a different physical directory other than “Site Directory”.

Page 16: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 16 of 63 http://protiumsoftware.com

3.3.12 Web Application Pool Name Step

This step collects Code Review Tool web application “Pool Name”.

Page 17: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 17 of 63 http://protiumsoftware.com

3.3.13 Web Application Pool Credentials User Name Step

This step collects Code Review Tool web application “Pool user name”. This is generally the

same as the account name specified previously in “Database Administrator” step.

Page 18: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 18 of 63 http://protiumsoftware.com

3.3.14 Web Application Pool Credentials Password Step

This step collects Code Review Tool web application “Pool user name’s password”.

Page 19: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 19 of 63 http://protiumsoftware.com

3.3.15 Web Site Binding Step

This step allows you select the type of network binding for Code Review Tool web application

from HTTP or HTTPS options.

Page 20: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 20 of 63 http://protiumsoftware.com

3.3.16 Web Site Binding Address Step

This step allows you to specify the “IP address” and “port” for Code Review Tool web

application binding.

NOTE: You can use “*” in IP address to bind to the hostname instead of a specific IP address.

This is useful for scenarios if the IP address is dynamically assigned to the server.

Page 21: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 21 of 63 http://protiumsoftware.com

3.3.17 Web Site Binding Certificate Step

This step allows you specify the following input for HTTPS binding:

Input Details

Certificate Name

The name of the certificate installed on the system to locating certificate for HTTPS binding.

Certificate Hash

The hash, i.e. thumb print string, of the certificate installed on the system to locate certificate for HTTPS binding.

Store Name

Name of the certificate store where the certificate is installed. Following are the valid store names:

1. My 2. Root 3. TrustedPeople 4. TrustedPublisher 5. CertificateAuthority 6. AuthRoot

Page 22: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 22 of 63 http://protiumsoftware.com

7. AddressBook More information on certificate stores can be found at http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.storename.aspx

Only one of “Certificate Name” or “Certificate Hash” values needs to be specified.

3.3.18 Web Application Upload Directory Step

This step allows you to specify a directory where the Code Review Tool web application

downloads and stores change sets temporarily while creating reviews from different version

control servers.

Page 23: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 23 of 63 http://protiumsoftware.com

3.3.19 Web Application Email Notification Step

This step allows you specify different inputs for sending email notification when status of the

review changes. This step is optional, i.e. if you don’t provide the values the email notification

feature will be turned off.

Input Description

From Email From Email address for auto generated review status email notifications

SMTP Server DNS name for SMTP server. For e.g. smtp.gmail.com

SMTP Port IP port for SMTP server. For e.g. 587 for HTTPS port for smtp.gmail.com

SMTP User Name

User account name to log into SMTP for sending emails. Generally the same as “From Email” value.

SMTP Password

Password of the SMTP User account to log into SMTP for sending emails.

Page 24: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 24 of 63 http://protiumsoftware.com

3.3.20 Web Application User Accounts Step

This step allows you to select one of the following Code Review Tool user accounts types:

Type Details

ASP.NET SQL User Accounts

This allows Code Review Application to integrate with ASP.NET SQL user authentication. The user accounts are kept in the Code Review Application database.

Windows Domain User Accounts

This allows Code Review Application to integrate with your existing Active Directory or LDAP installation to authenticate users.

Windows Local Machine User Accounts

This allows Code Review Application to integrate with local user accounts on a Windows machine to authenticate users.

Page 25: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 25 of 63 http://protiumsoftware.com

3.3.21 Web Application Windows Authentication Step

This step is only provided when you select “Windows Domain User Accounts” or “Windows

Local Machine User Accounts” in previous step. This step allows you to select one of the

following Windows authentication types:

Type Details

Don’t Prompt for User Credentials

Selecting this option, allows users to use their existing windows logged on credentials for authenticating against Code Review Tool site.

Prompt for User Credentials

This forces the users to enter their Windows credentials, using forms, to authenticate against Code Review Tool site.

Page 26: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 26 of 63 http://protiumsoftware.com

3.3.22 Web Application Authentication Provider Step

This step is only provided when you select “Windows Domain User Accounts” in “Web

Application User Accounts Step”. This step allows you to select one of the following provider

types:

Type Details

ASP.NET Active Directory Membership Provider

Select this if you would like to use ASP.NET’s default Active Directory authentication provider.

Protium Software’s Active Directory Membership Provider

Select this if you would like to use Protium Software’s Active Directory authentication provider.

Page 27: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 27 of 63 http://protiumsoftware.com

3.3.23 Web Application Active Directory Authentication Step

This step allows you to specify various inputs for authenticating users against your existing

Active Directory installation.

Input Details

Server Name

Domain server name for authenticating against Active Directory

Domain Name

Domain name of the Domain against which the user authentication needs to happen. For e.g. “YOURDOMAIN” or “DC=corp,DC=testdomain,DC=com”.

User Name Name of user who has read/write access to the above specified Active Directory domain. For e.g. CORP\administrator or [email protected].

Password Password of the above user principal to access Active Directory domain.

Page 28: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 28 of 63 http://protiumsoftware.com

3.3.24 Web Application Roles Step

This step allows you to specify the role names for Code Review Tool users and administrators:

Type Details

User Role Name

All regular Code Review Tool users should be present in this role to log into Code Review Tool web application.

Admin Role Name

All administrator users of code review tool should be present in this role to access administrator specific features of Code Review Tool web application. Users belonging to administrator role have the following specific features:

1. Administrator can view and manage reviews across all the users of the Code Review Tool

2. Administrator can notify all the users with an email using “Notify Users” link from “Accounts” page.

Page 29: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 29 of 63 http://protiumsoftware.com

NOTE: A user should either be present in Users role or Administrators role to login into Code

Review Tool web application successfully.

3.3.25 Web Application Administrator Step

This step is only provided when you selected “Windows Domain User Accounts” or “Windows

Local Machine User Accounts” in “Web Application User Accounts Step”. This step allows you

to specify an existing Windows user to be added to Administrator role for Code Review Tool

application during setup.

Input Details

Admin Name

Existing Windows User account name to be to Administrator role for Code Review Tool web application. For e.g. “admin”.

Page 30: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 30 of 63 http://protiumsoftware.com

3.3.26 Web Application Administrator Credentials Step

This step is only provided when you selected “ASP.NET SQL User Accounts” in “Web

Application User Accounts Step”. This step allows you to specify various inputs for creating a

new user in Administrator role for Code Review Application web application during setup.

Input Details

Admin Email Email of the administrator account. For e.g. [email protected].

Admin Name User account name of the administrator account. For e.g. “admin”.

Admin Password Password for the administrator account. For e.g. “admin@codereview”

Page 31: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 31 of 63 http://protiumsoftware.com

3.3.27 Protect Configuration Step

This step allows you to select one of the following for protecting various configuration files:

Type Details

Encrypt Configuration Files

Select this if you would like to encrypt sensitive information in configuration files like web.config, craconfig.exe.config etc. For production deployments, we recommend you choose this setting to keep your installation secure.

Don’t Encrypt Configuration Files

Select this if you would like to don’t want to encrypt sensitive information in configuration files like web.config, craconfig.exe.config etc. This option is only useful for scenarios where you want edit the configuration settings manually to handle scenarios which are not supported by setup. NOTE: You can encrypt the files after edit them as describe in section “8.8.2 Encrypting Code Review Tool sections in web.config”

Page 32: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 32 of 63 http://protiumsoftware.com

3.3.28 Product Activation Step

This step allows you specify various inputs for activating your Code Review Tool application

after installation using a valid product key.

Input Details

Product Key Product key for Code Review Tool application. This product key is 35 characters wide with a ‘-‘ character after every 5 characters. For e.g. ABCDE-FGHIJ-KLMNO-PQRST-UVWXY-Z1234

Activation Server URL

Product Activation Server URL. This should be https://codereviewtool.com.

Page 33: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 33 of 63 http://protiumsoftware.com

3.3.29 Confirmation Step

This step lists all the options you selected in previous steps and confirms if you want to proceed

ahead to install Code Review Tool.

Page 34: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 34 of 63 http://protiumsoftware.com

3.3.30 Installation Status Step

This step lists the status of the installation.

Page 35: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 35 of 63 http://protiumsoftware.com

4.0 Managing Users and Roles

Based on the type for user authentication type you selected during the setup you can manage

Code Review Tool users and roles differently.

4.1 Sql User Authentication

You can manage users in this case using the following tools:

1. IIS Manager (Inetmgr.exe)’s .NET User Management Console for managing users

2. IIS Manager (Inetmgr.exe)’s .NET Role Management Console for managing roles

3. “Craconfig.exe –user” command for managing users

4. “Craconfig.exe –role” command for managing roles

Page 36: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 36 of 63 http://protiumsoftware.com

Role Management using IIS Manager

User Management using IIS Manager

4.2 Active Directory User Authentication

1. Active Directory Users and Computers Management Console (dsa.msc)

2. “Craconfig.exe –user” command for managing users

3. “Craconfig.exe –role” command for managing roles

Page 37: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 37 of 63 http://protiumsoftware.com

User and Role Management using Active Directory Management Console

4.3 Windows User Authentication

1. Local Users and Groups Management Console (lusrmgr.msc)

4. “Craconfig.exe –user” command for managing users

2. “Craconfig.exe –role” command for managing roles

Page 38: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 38 of 63 http://protiumsoftware.com

Local Group Management Console

Local User Management Console

4.4 CraConfig.exe Role Management

Page 39: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 39 of 63 http://protiumsoftware.com

Using CraConfig.exe you can manage roles across all different types of user authentication like

Sql, Active Directory and Windows user authentication.

CraConfig.exe provides the following commands for role management:

Command Details

CraConfig.exe –role –list Lists all the roles. In case of Windows and Active Directory and Windows user authentication roles map to groups.

CraConfig.exe –role –create

Creates a given role. For e.g. Craconfig.exe –role –create –name CRUsers

CraConfig.exe –role –delete

Deletes a given role. For e.g. Craconfig.exe –role –delete –name CRUsers –confirm

CraConfig.exe –role –edit –add

Adds given user name(s) to specified role. For e.g. Craconfig.exe –role –edit –name CRUsers –add DOMAIN\username

CraConfig.exe –role –edit –remove

Removes given user name(s) from specified role. For e.g. Craconfig.exe –role –edit –name CRUsers –remove DOMAIN\username

4.5 CraConfig.exe User Management

Using CraConfig.exe you can manage users across all different types of user authentication like

Sql, Active Directory and Windows user authentication.

CraConfig.exe provides the following commands for user management:

Command Details

CraConfig.exe –user –list Lists all the users.

CraConfig.exe –user –create

Creates a given user. For e.g. Craconfig.exe –user –create –name tester –email [email protected] –password testing –role CRUsers

CraConfig.exe –user –edit Edits a given user. For e.g. Craconfig.exe –user –edit –name tester –password newpassword –email [email protected]

CraConfig.exe –user –delete

Deletes a given user. For e.g. Craconfig.exe –user –delete –name tester –confirm

5.0 Licensing

Page 40: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 40 of 63 http://protiumsoftware.com

Code Review Tool allows multiple users to login and use the features. The maximum number of

users who can login for your Code Review Tool installation is dependent on your license

determined by your product key.

You can only configure up to maximum licensed user accounts for Code Review Tool to log in

and use Code Review Tool simultaneously. When the system reaches maximum user limit new

users are not allowed to log in.

The default trial key which comes with distribution is valid for 30 days from the time of

activation and allows five users.

You can activate your Code Review Tool installation using SetupWizard.exe and selecting

“Product Activation” in Setup Type step.

You can also activate your Code Review Tool installation using “CraConfig.exe –activatekey”

command. For e.g.

C:\ > %systemdrive%\inetpub\wwwroot\CodeReviewTool\bin\CraConfig.exe -activatekey

-productkey XE1EF-YYF3A-6G9G1-02T4E-PXX9F-2JP87 -outfile

%systemdrive%\inetpub\wwwroot\CodeReviewTool\License.xml

The activated license is stored in Code Review Tool installation folder as “License.xml”. Please

note that this license is locked the computer on which it was activated and cannot be copied

and used on another computer.

6.0 Upgrading

You can upgrade your Code Review Tool installation using “CraConfig.exe –upgradesite”

command. This only upgrades your site deploying fixes to the Code Review Tool web

application. For e.g.

<Extracted Folder>\bin\CraConfig.exe -upgradesite -appdir

%systemdrive%\inetpub\wwwroot\CodeReviewTool

NOTE: Currently upgrading doesn’t support upgrading database schema revisions across

multiple versions. Database schema is revised very infrequently so this should not be an issue

for you. If you do run into a scenario where you need to upgrade your existing Code Review

Tool database schema please contact [email protected].

Page 41: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 41 of 63 http://protiumsoftware.com

7.0 Uninstalling

You can uninstall your Code Review Tool installation using “CraConfig.exe –uninstall”

command. The uninstall commands provides option to uninstall either Code Review Tool web

application or database or both of them. For .e.g

<Extracted Folder>\bin\CraConfig.exe -uninstall -appdir

%systemdrive%\inetpub\wwwroot\CodeReviewTool -confirm

If you want to delete your Code Review Tool database specify “–deletedb” option. If you want

to remove your Code Review Tool web application files specify “–removefiles” option. If you

want to delete Code Review Tool web application pool you need to specify “–deletepool”

option.

8.0 Advanced Configuration

Code Review Tool configuration in “web.config” is spread across multiple sections under

<configuration/> section.

These sections are:

Section Name Purpose

CodeReviewApplication Specifies different types of configuration for Code Review Tool application

system.net/mailSettings/smtp Specifies SMTP settings for review status change email notifications

connectionStrings Specifies connection strings for database and authentication

authentication Specifies authentication configuration

membership Specifies user management and authentication configuration

roleManager Specifies role management configuration

trace Specifies trace configuration

8.1 CodeReviewApplication Section

CodeReviewApplication section contains different Code Review Tool application configuration

properties grouped logically into multiple different sub-elements.

Page 42: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 42 of 63 http://protiumsoftware.com

This section is physically stored in “bin\CodeReviewApplication.config” file and multiple

different configuration files, for e.g. web.config, craconfig.exe.config, crutil.exe.config etc.

share it.

Element Name Purpose

CoreConfig Contains core configuration settings for Code Review Tool application.

SearchConfig Contains search configuration settings for Code Review Tool application.

UIConfig Contains Web UI configuration settings for Code Review Tool application.

SourceControlManagers Contains configuration about different Source Control Manager plug-ins used by Code Review Tool application.

Depots Contains configuration about different global depots, in different Source Control Managers, used by Code Review Tool application.

TextFiles Contains a list of file extensions which need to be treated as text files by Code Review Tool diff engine while computing differences between two versions of the file with specified extensions.

CodeFormatters Contains a list of file extensions associated with different code formatters for syntax highlighting of source code.

Languages Contains definitions of different languages used by generic code formatter for syntax highlighting of source code.

8.1.1 CoreConfig Element

This element contains the following core configuration settings for Code Review Tool

application.

Name FilesRootFolder

Type String

Required Yes

Default Value

“upload”

Description Specifies either relative of absolute path to folder which is used to store temporarily downloaded change lists from version control systems while creating reviews.

Name DiffExecutable

Type String

Required Yes

Page 43: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 43 of 63 http://protiumsoftware.com

Default Value

“bin\crt.exe”

Description Specifies either relative of full path to “crt.exe” which is used to compute differences between two versions of a file while creating reviews.

Name ReviewStatusChangeEmail

Type Boolean

Required No

Default Value

false

Description A flag indicating whether to send review status change email notifications or not.

Name Registration

Type Boolean

Required No

Default Value

false

Description A flag indicating whether to allow free new user registration through “Register” link from login page.

Name RegistrationRequest

Type Boolean

Required No

Default Value

false

Description A flag indicating whether new user registrations should be treated as requests or not. If “false” the user is allowed to register directly using “Register” link. If “true” the registration requests from users are queued and administrator approves or rejects each request. When admin approves a request email notification is sent to email specified in the request with a unique link associated with the request so that the user can complete the registration using the unique link. NOTE: This property value is applicable only when “Registration” property has a value of “true”.

Name FeedbackEmail

Type String

Required No

Default Value

[email protected]

Page 44: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 44 of 63 http://protiumsoftware.com

Description Specifies the email ID to which the feedback is sent when a user submits a feedback using “Feedback” link.

Name SqlCommandTimeout

Type Int

Required No

Default Value

120

Description Specifies time out for database commands in seconds.

Name SyntaxHighlighting

Type Boolean

Required No

Default Value

true

Description A flag indicating whether to enable or disable syntax highlighting.

Name UseRemoteScripts

Type Boolean

Required No

Default Value

false

Description A flag indicating whether to use jquery scripts and stylesheets from well known remote content distribution network (https://ajax.googleapis.com) or not while rendering web pages. If false, the local copy of the jquery scripts and stylesheets installed with the application are used while rendering web pages.

Name UserRole

Type String

Required Yes

Default Value

CRUsers

Description Role name, or Group name, for regular Code Review Tool users. All Code Review Tool users should belong to this group.

Name AdminRole

Type String

Required Yes

Default CRAdmins

Page 45: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 45 of 63 http://protiumsoftware.com

Value

Description Role name, or Group name, for Code Review Tool administrator users. All Code Review Tool administrators should belong to this group.

Name RecaptchaPublicKey

Type String

Required No

Default Value

“”

Description Recaptcha public key for enforcing CAPTCHA during account registration.

Name RecaptchaPrivateKey

Type String

Required No

Default Value

“”

Description Recaptcha private key for enforcing CAPTCHA during account registration.

An example CoreConfig element is:

<CoreConfig FilesRootFolder="upload"

DiffExecutable="bin\crt.exe"

ReviewStatusChangeEmail="false"

Registration="true"

FeedbackEmail="[email protected]"

SqlCommandTimeout="120"

UserRole="CRUsers"

AdminRole="CRAdmins"/>

8.1.2 SearchConfig Element

This element contains the following search configuration settings for Code Review Tool

application:

Name MaxResults

Type Int

Required Yes

Default Value

50

Description Specifies the maximum results, sorted by relevance, which should be listed when

Page 46: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 46 of 63 http://protiumsoftware.com

user searches for content using “Search” link.

Name ResultsMaxLines

Type Int

Required Yes

Default Value

5

Description Specifies maximum summary lines to display for each item displayed in search result.

An example for SearchConfig element is:

<SearchConfig MaxResults="100" ResultMaxLines="5"/>

8. 1.3 UIConfig Element

This element contains the following Web UI configuration settings for Code Review Tool

application:

Name DiffViewType

Type Enumeration (“Merged”, “SideBySide”)

Required No

Default Value

“Merged”

Description Specifies the default diff view that should be used to render differences when user wants to view differences between two versions of a file.

Name SummaryDiff

Type Boolean

Required No

Default Value

true

Description A flag indicating whether to enable summary differences view or not. In summary differences view similar sections between two versions of a file are summarized in a short summary section to allow users to focus on differences.

Name SummaryContextLines

Type Int

Page 47: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 47 of 63 http://protiumsoftware.com

Required No

Default Value

3

Description Specifies the number of similar lines to show before and after summary section in differences view between two files. NOTE: This value is only used if “SummaryDiff” value is “true”.

Name SourcePreviewExtraLines

Type Int

Required true

Default Value

5

Description Specifies the number of similar lines to show before and after the range of source lines associated with a comment thread in comment thread details view.

Name AllowPackageUploads

Type Boolean

Required true

Default Value

false

Description A flag indicating whether diff packages can be uploaded to an existing or new review. NOTE: This property is not supported currently and its value should always be “false”.

An example of UIConfig element is:

<UIConfig

DiffViewType="Merged"

SummaryDiff="true"

SummaryContextLines="3"

SourcePreviewExtraLines="5"

AllowPackageUploads="false"/>

8. 1.4 SourceControlManagers Element

This element contains configuration about different Source Control Manager plug-ins used by

Code Review Tool application in a collection of “SourceControlManager” elements.

Each “SourceControlManager” element contains the following properties

Page 48: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 48 of 63 http://protiumsoftware.com

Name Name

Type String

Required Yes

Description Specifies a unique name for the source control manager plug-in which is used to identify the plug-in from “depot” section subsequently.

Name Type

Type String

Required Yes

Description Specifies the type information, in the standard Type format, for loading the source control manager plug-in assembly which implements the “ISourceControlManager” and “ISourceControlManagerSetup” interface.

Name Path

Type String

Required No

Description Specifies the relative or full path to the source control manager plug-in assembly. If the paths are relative they should be with the “web application” folder path, which by default is “%systemdrive%\inetpub\wwwroot\CodeReviewTool”.

Each Source Control Manager plug-in specific settings can be different. The schema for these

settings is described in “Settings” element in the following format:

Item Description

Element name Name of the setting for Source Control Manager

Element content Description for the setting to use in UI for Source Control Manager

“required” property

Boolean property indicating whether the setting is optional or required

“password” property

Boolean property indicating whether the setting is part of credential or not. Credential settings are shown to the user with “masked” character like “*”.

For e.g. the Team Foundation Server plug-in specifies the following schema for its depot

settings:

<SourceControlManager

Name="TeamFoundation"

Type="ChangeListLibrary.TeamFoundationSourceControlManager,

TeamFoundationSourceControlManager, Culture=neutral,

Version=1.0.0.0, PublicKeyToken=ee3d7489c8569e42"

Page 49: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 49 of 63 http://protiumsoftware.com

Path="bin\Plugins\TeamFoundationServer\2008\TeamFoundationS

ourceControlManager.dll">

<Settings>

<Server required="true">Server</Server>

<ProjectName required="true">Project

Name</ProjectName>

<UserName required="false">User Name</UserName>

<Password required="false"

password="true">Password</Password>

<DomainName required="false">Domain Name</DomainName>

</Settings>

</SourceControlManager>

8. 1.5 Depots Element

This element contains configuration about different global depots, for different Source Control

Managers, used by Code Review Tool application in a collection of “Depot” elements.

Each “Depot” element contains the following properties

Name Name

Type String

Required Yes

Description Specifies a unique name for the depot of a particular source control manager which is used to identify the depot subsequently.

Name Type

Type String

Required Yes

Description Specifies the name of the Source Control Manager plug-in which is used to represent the type of the depot. This value should be listed in a “SourceControlManager” element under “SourceControlManagers” element.

Each “Depot” element contains a “Settings” element listing different settings for the depot in

the format as dictated by the settings schema in the related “SourceControlManager” element.

For e.g. the following is an example of an instance of TFS depot:

<Depot Name="tfs-demo" Type="TeamFoundation">

<Settings

Page 50: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 50 of 63 http://protiumsoftware.com

Server=https://tfs.codeplex.com/tfs/TFS24

ProjectName="testproject"

UserName="test-user"

Password="user!password789"

Domain="domainname" /> </Depot>

NOTE: The properties in “Depot/Settings” element should match the schema for the settings as

described in related “SourceControlManager/Settings” element.

8. 1.6 TextFiles Element

This element contains a list of file extensions which need to be treated as text files by Code

Review Tool diff engine while computing differences between two versions of the file with

specified extensions in a collection of “TextFile” elements.

Each “TextFile” element contains the following properties

Name Extension

Type String

Required Yes

Description Specifies the file name extension which is to be treated as text file while computing differences between two versions of files with the specified extension. Generally source control manager helps in the identification of whether a file is text file or not. This section is useful for scenarios when a file type gets wrongly interpreted as binary file by Code Review Tool and no differences are displayed for that particular file type. In this scenario using this section you can override the file type to be interpreted as text file by Code Review Tool to compute and display the differences correctly.

Some examples of “TextFile” element are:

<TextFiles>

<TextFile Extension=".cmd"/>

<TextFile Extension=".build"/>

</TextFiles>

8. 1.7 CodeFormatters Element

Page 51: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 51 of 63 http://protiumsoftware.com

This element contains a list of file extensions associated with different code formatters for

syntax highlighting of source code in a collection of “CodeFormatter” elements.

Each “CodeFormatter” element contains the following properties

Name Extension

Type String

Required Yes

Description Specifies a unique file extension value of source code for which the formatter should be used.

Name Formatter

Type String

Required Yes

Description Specifies the name of “CodeFormatter” which can either be a name of generic code formatter or that of a specific code formatter.

There are two types of code formatters:

Code Formatter Type

Description

Generic Code Formatter

This code formatter is a generic formatter which uses a “Languages/Language” element to format the source code for a particular language. Following is the list of generic code formatters specified by default in “web.config”:

1. ruby 2. python 3. perl 4. java

Specific Code Formatter

These code formatters are implemented and supported by Code Review Tool by default to support formatting a single language source code. Following is the list of specific code formatters:

1. cpp 2. xml 3. c# 4. css 5. html 6. javascript 7. php 8. sql 9. asax 10. ashx

Page 52: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 52 of 63 http://protiumsoftware.com

11. aspx 12. vb.net

Some examples of “CodeFormatter” elements for different languages are listed below:

<CodeFormatters>

<CodeFormatter Extension=".cpp" Formatter="cpp"/>

<CodeFormatter Extension=".h" Formatter="cpp"/>

<CodeFormatter Extension=".hpp" Formatter="cpp"/>

<CodeFormatter Extension=".cs" Formatter="c#"/>

<CodeFormatter Extension=".css" Formatter="css"/>

</CodeFormatters>

8. 1.8 Languages Element

This element contains definitions of different languages used by generic code formatter for

syntax highlighting of source code in a collection of “Language” elements.

Each “Language” element describes the language properties to be used by the generic code

formatter described in previous section.

Each “Language” element contains the following properties:

Name Id

Type String

Required Yes

Description Specifies a unique name for the language element which is used by generic code formatter to lookup language details to perform syntax highlighting of source code.

Name Keywords

Type String (in element content)

Required Yes

Description Describes the keywords for the language separated by space.

Name SingleLineCommentRegEx

Type String

Required No

Description Specifies the .Net regular expression used to identify a single line comment for the language.

Page 53: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 53 of 63 http://protiumsoftware.com

Name MultiLineCommentRegEx

Type String

Required No

Description Specifies the .Net regular expression used to identify a comment spanning multiple lines for the language.

Name StringRegEx

Type String

Required No

Description Specifies the .Net regular expression used to identify a string literal for the language.

An example “Language” element for “Java” language is listed below:

<Language Id="java"

SingleLineCommentRegEx="(//.*?)\r?$"

MultiLineCommentRegEx="/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))

*\*+/" StringRegEx="(?s)(&quot;[^\n]*?(?&lt;!\\)&quot;)">

<Keywords>abstract continue for new switch assert default

goto package synchronized boolean do if private this break

double implements protected throw byte else import public

throws case enum instanceof return transient catch extends

int short try char final interface static void class

finally long strictfp volatile const float native super

while</Keywords>

</Language>

8.2 system.net/mailSettings/smtp Section

This section is used to configure SMTP settings for sending review status change email notifications to Code Review Tool users. More details at http://msdn.microsoft.com/en-US/library/ms164240(v=VS.80).aspx. An example “smtp” element is: <system.net>

<mailSettings>

<smtp deliveryMethod="Network"

from="[email protected]">

<network

Page 54: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 54 of 63 http://protiumsoftware.com

host="smtp.gmail.com"

port="587"

userName="[email protected]"

password="sender password"/>

</smtp>

</mailSettings>

</system.net>

NOTE: This section is used only when “ReviewStatusChangeEmail” setting in CodeReviewApplication/CoreConfig element is “true”.

8.3 connectionStrings Section

This section lists different connections string used by Code Review Tool.

This section is physically stored in “bin\ConnectionStrings.config” file and multiple different

configuration files, for e.g. web.config, craconfig.exe.config, crutil.exe.config etc. share it.

Currently following connection strings are used:

Name Purpose

CodeReviewApplicationDatabaseConnectionString For connecting to Code Review Tool SQL database.

ADConnectionString For connecting to Active Directory for Active Directory user authentication.

WinNTConnectionString For Windows local users and group authentication.

An example:

<connectionStrings>

<clear/>

<add name="CodeReviewApplicationDatabaseConnectionString"

connectionString="server=localhost;database=CodeReviewApplicati

onDatabase;IIntegrated Security=True"

providerName="System.Data.SqlClient"/>

<add name="ADConnectionString"

connectionString="LDAP://localhost/DC=yourdomain,DC=com"/>

<add name="WinNTConnectionString"

connectionString="WinNT://localhost/Users"/>

</connectionStrings>

Page 55: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 55 of 63 http://protiumsoftware.com

8.4 authentication Section

This section is used to configure the authentication scheme for Code Review Tool. More details at http://msdn.microsoft.com/en-us/library/532aee0e(v=VS.80).aspx.

8.5 membership Section

This section is used for managing and authentication of user accounts for Code Review Tool. This section is physically stored in “bin\Membership.config” file and multiple different

configuration files, for e.g. web.config, craconfig.exe.config etc. share it.

More details at http://msdn.microsoft.com/en-US/library/1b9hw62f(v=VS.80).aspx.

8.6 roleManager Section

This section is used to configure role management for Code Review Tool. This section is physically stored in “bin\RoleManager.config” file and multiple different

configuration files, for e.g. web.config, craconfig.exe.config etc. share it.

More details at http://msdn.microsoft.com/en-US/library/ms164660(v=VS.80).aspx.

8.7 trace Section

This section is used to configure diagnostic tracing for Code Review Tool. More details at http://msdn.microsoft.com/en-US/library/6915t83k(v=VS.80).aspx. Code Review Tool writes a diagnostic trace with error details in “Trace.log” file in the Code Review Tool application folder. By default this file is located at “%systemdrive%\inetpub\wwwroot\CodeReviewTool\Trace.log”.

8.8 Section Encryption and Decryption

Page 56: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 56 of 63 http://protiumsoftware.com

The installer for Code Review Tool, by default, encrypts the following sections which contains sensitive information:

1. CodeReviewApplication 2. system.net/mailSettings/smtp 3. connectionStrings 4. system.web/membership 5. system.web/roleManager

The sections are encrypted using a key container named “CodeReviewApplicationKeys”. This key container contents are unique on each machine and contains the keys necessary for encrypting and decrypting relevant sections. http://msdn.microsoft.com/en-us/library/dtkwfdky(v=VS.90).aspx provides a step by step example of how to encrypt and decrypt “web.config” sections. http://msdn.microsoft.com/en-us/library/53tyfkaw(v=VS.90).aspx contains more details on encrypting protected configuration in “web.config” sections.

8.8.1 Decrypting Code Review Tool sections in web.config

The following is a sample script to decrypt relevant sections of Code Review Tool in web.config file assuming you have installed Code Review Tool to “%systemdrive%\inetpub\wwwroot\CodeReviewTool” folder:

1. set path=%path%;%windir%\Microsoft.NET\Framework\v2.0.50727;

2. cd /d %systemdrive%\inetpub\wwwroot\CodeReviewTool

3. aspnet_regiis.exe -pdf CodeReviewApplication %cd%

4. aspnet_regiis.exe -pdf connectionStrings %cd%

5. aspnet_regiis.exe -pdf system.web/membership %cd%

6. aspnet_regiis.exe -pdf system.web/roleManager %cd%

7. aspnet_regiis.exe -pdf system.net/mailSettings/smtp %cd%

8.8.2 Encrypting Code Review Tool sections in web.config

The following is a sample script to encrypt relevant sections of Code Review Tool in web.config file assuming you have installed Code Review Tool to “%systemdrive%\inetpub\wwwroot\CodeReviewTool” folder:

1. set path=%path%;%windir%\Microsoft.NET\Framework\v2.0.50727;

2. cd /d %systemdrive%\inetpub\wwwroot\CodeReviewTool

3. aspnet_regiis.exe -pef CodeReviewApplication %cd%

4. aspnet_regiis.exe -pef connectionStrings %cd%

5. aspnet_regiis.exe -pef system.web/membership %cd%

Page 57: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 57 of 63 http://protiumsoftware.com

6. aspnet_regiis.exe -pef system.web/roleManager %cd%

7. aspnet_regiis.exe -pef system.net/mailSettings/smtp %cd%

9.0 Client Installation and Upgrade If you would like to install Code Review Tool on other machines to use client tools, like craconfig.exe and crutil.exe for pre-commit reviews or integration purposes, you can use “craconfig.exe –client” commands. For installing client tools use the following command: c:\ > craconfig.exe -client -install -dir {client install directory} [-sourcedir {source directory name} (C:\temp\download\bin)] “-dir” is the directory to install Code Review Tool client tools. “-sourcedir” is an optional argument specifying the source of installation, which by default is the downloaded and extracted location of Code Review Tool distribution zip file. For updating client tools use the following command: c:\ > craconfig.exe -client -upgrade -dir {client install directory} [-sourcedir {source directory name} (C:\temp\download\bin)] “-dir” is the installed directory of Code Review Tool client tools which needs to be upgraded. “-sourcedir” is an optional argument specifying the source of installation, which by default is the downloaded and extracted location of Code Review Tool distribution zip file.

10.0 Automatic Review Creation for Team Foundation System Check-ins This section explains how to automatically create reviews for change sets as they are checked into Team Foundation System version control. http://msdn.microsoft.com/en-us/magazine/cc507647.aspx contains more details about TFS notifications. The binaries which are required for achieving this integration are:

Binary Name Purpose

Bissubscribe.exe A binary shipped with Team Foundation Server distribution. This binary is needed to register an event sink for Check-in notifications. This binary is generally present in “c:\Program Files\Microsoft Team Foundation Server 2010\Tools” folder.

Page 58: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 58 of 63 http://protiumsoftware.com

TfsNotifier.exe A binary, which is hosted as Windows Service, to process the TFS Check-in notifications. This binary is shipped with Code Review Tool distribution. This binary receives the TFS Check-in notifications on SOAP and then does the necessary processing to create the review and start it automatically on behalf of change set committer. This binary is present in folder where the Code Review Tool client is installed. To install Code Review Tool client binaries see the above “9.0 Client Installation and Upgrade” section.

Steps to enable automatic review creation for TFS:

1) Install or upgrade your Code Review Tool installation to latest binaries a. To install Code Review Tool follow “3.0 Installing” section b. To upgrade Code Review Tool follow “6.0 Upgrading” section

2) Install or upgrade Code Review Tool client binaries on Code Review Tool machine. a. You can use “C:\Program Files\Protium Software\CodeReviewTool” as the

client installation folder. b. To install or upgrade Code Review Tool client binaries follow instructions

specified in “9.0 Client Installation and Upgrade” section. 3) Install TfsNotifier.exe service on Code Review Tool machine from client binaries folder

using “installutil.exe” a. C:\>%windir%\microsoft.net\framework\v2.0.50727\installutil.exe

“C:\Program Files\Protium Software\CodeReviewTool\TfsNotifier.exe” b. During service installation, when prompted for service account credentials use

an account which has read permissions for your TFS collection. c. Configure TfsNotifier settings by following “10.1 Configuring TfsNotifier” section

below. 4) On Team Foundation Server machine register the TfsNotifier service end point as

listener for Check-in notification using “Bissubscribe.exe” a. C:\>"c:\Program Files\Microsoft Team Foundation Server

2010\Tools\BisSubscribe.exe" /eventType CheckinEvent /address http://YourCodeReviewToolSrv:8095/TfsNotifier/CheckinEventService/ /collection http://YourTFSsrv:8080/Tfs/YourCollectionName /deliveryType Soap

b. Configure your networking firewall on Team Foundation Server and Code Review Tool machine to allow check-in notifications to be sent and received on the port you specified above for “/address” argument.

5) On Code Review Tool machine start the TfsNotifier service a. C:\>Net start TfsNotifier

6) Check-in in a dummy change to TFS project configured in TfsNotifier to see if the review gets created automatically or not.

a. NOTE: TFS uses batch job to send check-in notifications every 2 minutes. So sometimes it can take more than 2 minutes for a review to be created after a change set is checked in.

Page 59: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 59 of 63 http://protiumsoftware.com

b. If the review is not getting created automatically check for failure details in Application event log from “TfsNotifier” source using Eventvwr.exe.

c. http://blogs.msdn.com/b/granth/archive/2009/10/28/tfs2010-diagnosing-email-and-soap-subscription-failures.aspx contains more details about how to debug TFS SOAP notifications.

10.1 Configuring TfsNotifier

You can configure TfsNotifier behavior by editing TfsNotifier.exe.config file. This file is generally present in your client installation folder e.g. “C:\Program Files\Protium Software\CodeReviewTool\TfsNotifier.exe.config”.

10.1.1 Services Configuration Section

This section configures the listening end point for TfsNotifier service.

<configuration> <system.serviceModel> <services> <service name="TfsNotifier.CheckinEventService" behaviorConfiguration="TfsNotifierBehavior"> <host> <baseAddresses> <add baseAddress="http://YourCodeReviewSrvName:8099/TfsNotifier/CheckinEventService/"/> </baseAddresses> </host> </service> </services> </system.serviceModel> </configuration>

You can configure the listening end point (port) for TfsNotifier using “baseAddress” attribute specified in system.serviceModel/services/service/host/baseAddresses/add element. NOTE: The listening port value specified above should be configured in networking firewall to allow notification traffic.

10.1.2 Plugins Configuration Section

This section specifies the source control plug-ins and the depots. You only need to configure the <Depot/> entries for your scenario. <Depots>

<Depot Name="tfs" Type="TeamFoundation">

Page 60: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 60 of 63 http://protiumsoftware.com

<Settings Server="http://localhost:8080/Tfs" ProjectName="yourporjectname" UserName="" Password="" DomainName=""/>

</Depot> </Depots>

Generally there is only one depot configured. If want to use a single TfsNotifier to create reviews for different Team Foundation Server collections you can have more Team Foundation Server depots configured in the Plugins section. Each “Depot” element contains the following attributes:

Name Name

Type String

Required Yes

Description Specifies a unique friendly name for the TFS depot to be referred later elsewhere in the configuration file. For e.g. “tfs”.

Name Type

Type String

Required Yes

Description Don’t edit this. Specifies the type of the source control manager. This should be “TeamFoundation”.

The “Depot/Settings” element contains the following attributes:

Name Server

Type String

Required Yes

Description Specifies the TFS server URL for the project. For e.g. http://localhost:8080/tfs

Name ProjectName

Type String

Required Yes

Description Specifies the TFS project name. For e.g. “Testing”

Name UserName

Type String

Required No

Description Specifies the account’s user name for accessing the TFS project.

Page 61: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 61 of 63 http://protiumsoftware.com

Name Password

Type String

Required No

Description Specifies the account’s password for accessing the TFS project

Name Domain

Type String

Required No

Description Specifies the account’s domain name for access the TFS project if the account is in a domain.

NOTE: If you have configured TfsNotifier.exe service to run in an account with access to your TFS projects then you don’t have to specify UserName, Password and Domain optional attributes in <Depot/Settings/> element.

10.1.3 TfsNotifier Configuration Section

This section configures Code Review Tool server on which the reviews should automatically created for different TFS projects. This section also configures which reviewers should be invited for change sets committed by a particular user in TFS project. <TfsNotifier TraceLogFile=" "> <CodeReviewServers> <CodeReviewServer Url="https://codereviewtool.com" UserName="" Password="" Depots="tfs"> <Committers> <Committer Name="domain\username1" Author="codereview-username1" Reviewers="codereview-username1,codereview-username2"/> <Committer Name="domain\username2" Author="codereview-username2" Reviewers="codereview-username1,codereview-username2"/> </Committers> </CodeReviewServer>

</CodeReviewServers> </TfsNotifier>

TfsNotifier element contains the following sub-elements:

Item Description

CodeReviewServers Collection of CodeReviewServer elements.

CodeReviewServer Describes the settings for a Code Review Tool server for creating reviews.

CodeReviewServer/Committers Collection of Committer elements.

CodeReviewServer/Committers/Committer Describes the details for creating review for each user who commits a change set.

Page 62: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 62 of 63 http://protiumsoftware.com

TfsNotifier element contains the following attributes:

Name TraceLogFile

Type String

Required No

Description Specifies a file name for logging TfsNotifier detailed trace messages. If not specified not trace log is generated. The trace log can be used to debug notification processing issues.

CodeReviewServer element contains the following attributes:

Name Url

Type String

Required Yes

Description Specifies a URL for your Code Review Tool server on which reviews should be created automatically. For e.g. http://yourcodereviewtoolserver

Name UserName

Type String

Required No

Description Specifies the “administrator” user name for the Code Review Tool server. NOTE: You need to specify and administrator user in Code Review Tool here as only administrators have capability to create reviews on other user’s behalf.

Name Password

Type String

Required No

Description Specifies the password for the above administrator user name for the Code Review Tool server.

Name Depots

Type String

Required Yes

Description Specifies a list of depot names separated by comma, as listed in the <Depots/> section, for which reviews should be created on this code review server when change sets are checked into associated TFS projects.

Name StartReview

Type bool

Required No

Description Specifies whether to start the review after creating it, for all committers on the “Depots” specified above.

Page 63: Code Review Tool Administration Guide - Protium Software

Code Review Tool Administration Guide http://codereviewtool.com

Protium Software Page 63 of 63 http://protiumsoftware.com

Committer element contains the following attributes:

Name Name

Type String

Required Yes

Description Specifies fully qualified account name of the committer in TFS collection. For e.g. “mydomain\tfsusername”.

Name Author

Type String

Required No

Description Specifies the account name in Code Review Tool server on behalf of whom the review needs to be created. If not specified, the committer user name from change set details is used for creating the review.

Name Reviewers

Type String

Required Yes

Description Specifies a list of account names in Code Review Tool server who should be added as reviewers for the created review.

Name StartReview

Type bool

Required No

Description Specifies whether to start the review after creating it for this particular committer when they check in a change set.