Connection strings…

While working against the K2 API you will find that there are a number of connection strings used to make the connection to the various K2 services such as User Role Manager, workflow server, the smartobject server.  There is a Class called SCConnectionStringBuilder provided by K2 which makes this task simple and consistent.

//we now have a connection string builder helper

SCConnectionStringBuilder connectionStrB= new SCConnectionStringBuilder();

connectionStrB.Host = “servernameFromConfig”;

connectionStrB.Integrated = true;

connectionStrB.IsPrimaryLogin = true;

connectionStrB.Port = portNumberFromConfig;

Most of the services except the workflow service listen on the default port for host server on 5555. The workflow service is on 5252 (unless of course you changed these port numbers during the configuration of K2)

The connection string is then retrieved and used as follows:

K2SeverObjectX.Connection.Open(connectionStrB.connectionString);

Published by jeylabs

Are you ready to Transform your Enterprise? www.jeylabs.com

%d bloggers like this: