This documentation is archived and is not being maintained.

BuildServiceHostUtilities.Register Method (IBuildServiceHost, String, String, X509Certificate2, String, Boolean)

Registers the service host with its project collection, by using the provided userName and password. If the service host is already registered, an exception is thrown. In this case, call Unregister first.

Namespace:  Microsoft.TeamFoundation.Build.Config
Assembly:  Microsoft.TeamFoundation.Build.Config (in Microsoft.TeamFoundation.Build.Config.dll)

public static void Register(
	IBuildServiceHost serviceHost,
	string serviceAccount,
	string serviceAccountPassword,
	X509Certificate2 serverCertificate,
	string authenticatingUserName,
	bool canTranslateAuthenticatingUserName
)

Parameters

serviceHost
Type: Microsoft.TeamFoundation.Build.Client.IBuildServiceHost

The service host to be registered.

serviceAccount
Type: System.String

The service account to use for the service host. If null, Network Service will be used.

serviceAccountPassword
Type: System.String

The password for the service account.

serverCertificate
Type: System.Security.Cryptography.X509Certificates.X509Certificate2

The X509 certificate to use for server authentication.

authenticatingUserName
Type: System.String
canTranslateAuthenticatingUserName
Type: System.Boolean

Show: