I am trying to build a web part to display the K2 tasks allocated to a user in a Sharepoint web part.
The code I have connects to the server perfectly, but it somehow loses the context of the logged on user and thus yielding no tasks as results.
This is the code I am using :
private string RenderWorkList()
{
StringBuilder sb = new StringBuilder();
Connection conn = new Connection();
conn.Open("PROJECTSERVER");
Worklist workList = conn.OpenWorklist("ASP");
foreach (WorklistItem item in workList)
{
//build up html
}
conn.Close();
return sb.ToString();
}
Any ideas? :roll: