I am trying to open the connection of K2 server to open the worklist item of a process. but when openning a connection it throws the below error.
Error " Value cant be null Parameter Name Token.
Code snipt is below.
private Connection _connection;
private WorklistItem _WorkListItem;
protected void Page_Load(object sender, EventArgs e)
{
LoadActions();
}
protected LoadActions()
{
SourceCode.Workflow.Client.ConnectionSetup connectionSetup = new SourceCode.Workflow.Client.ConnectionSetup();
connectionSetup.ConnectionParameters["Authenticate"] = "true";
connectionSetup.ConnectionParameters["Integrated"] = "true";
connectionSetup.ConnectionParameters["IsPrimaryLogin"] = "true";
connectionSetup.ConnectionParameters["Port"] = "5252";
connectionSetup.ConnectionParameters["SecurityLabelName"] = "K2";
connectionSetup.ConnectionParameters["UserID"] = Context.User.Identity.Name;
connectionSetup.ConnectionParameters["WindowsDomain"] = "vvvvvvvvvv";
if (_connection == null)
{
_connection = new Connection();
_connection.Open(connectionSetup);
//_connection.ImpersonateUser(Context.User.Identity.Name);
//_connection.ImpersonateUser("adqcca.farooqi");
}
}