Attempting to connect to the SourceCode.Workflow.Client API with static credentials results in error:

"ClientException: Authentication failed for user K2Service

SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder builder = new SourceCode.Hosting.Client.BaseAPI.SCConnectionStringBuilder();
builder.Authenticate = true;
builder.Host = "";
builder.Port = 5252;
builder.Integrated = false;
builder.IsPrimaryLogin = true;
builder.SecurityLabelName = "K2";
builder.WindowsDomain = "DENALLIX";
builder.UserID = "K2Service";
builder.Password = {password}";
SourceCode.Workflow.Client.Connection WorkflowClientConnection = new SourceCode.Workflow.Client.Connection();
WorkflowClientConnection.Open("", builder.ConnectionString);"


Although the WindowsDomain field is specified, the UserID field is expecting a string in the format "DOMAIN\username".


Specify the UserID in the 'DOMAIN\username' format, i.e.:

builder.UserID = @"DENALLIX\K2Service";