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)

Syntax

'Declaration
Public Shared Sub Register ( _
    serviceHost As IBuildServiceHost, _
    serviceAccount As String, _
    serviceAccountPassword As String, _
    serverCertificate As X509Certificate2, _
    authenticatingUserName As String, _
    canTranslateAuthenticatingUserName As Boolean _
)
public static void Register(
    IBuildServiceHost serviceHost,
    string serviceAccount,
    string serviceAccountPassword,
    X509Certificate2 serverCertificate,
    string authenticatingUserName,
    bool canTranslateAuthenticatingUserName
)
public:
static void Register(
    IBuildServiceHost^ serviceHost, 
    String^ serviceAccount, 
    String^ serviceAccountPassword, 
    X509Certificate2^ serverCertificate, 
    String^ authenticatingUserName, 
    bool canTranslateAuthenticatingUserName
)
static member Register : 
        serviceHost:IBuildServiceHost * 
        serviceAccount:string * 
        serviceAccountPassword:string * 
        serverCertificate:X509Certificate2 * 
        authenticatingUserName:string * 
        canTranslateAuthenticatingUserName:bool -> unit
public static function Register(
    serviceHost : IBuildServiceHost, 
    serviceAccount : String, 
    serviceAccountPassword : String, 
    serverCertificate : X509Certificate2, 
    authenticatingUserName : String, 
    canTranslateAuthenticatingUserName : boolean
)

Parameters

  • 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.

.NET Framework Security

See Also

Reference

BuildServiceHostUtilities Class

Register Overload

Microsoft.TeamFoundation.Build.Config Namespace