Skip to main content

I am trying to connect to a K2 Server in .NET, with this sentences

 

Connection con = null;
con = new Connection();
string sUserName = "K2:DOMAINNAMEAntoJu";
con.ImpersonateUser(sUserName);
con.Open("10.XXX.XX.XX");

 

But when i am trying to connect, it threads an exception:

 

An exception of type 'ClientException' occurred in SourceCode.Workflow.Client.dll but was not handled in user code

 

Additional information: 24404 Authentication with server failed for User@DOMAINNAME with Message: AcceptSecurityContext failed: The logon attempt failed

 

Anyone had a similar situation?

 

thank you

 

Juan Antonio

Were you referring to the Impersonation documented here?


http://help.k2.com/onlinehelp/k2blackpearl/devref/current/default.htm#How_to_Use_Impersonate_User_using_the_K2_API.html?Highlight=impersonate


  


* It looks like it may be failing during the authentication, and not the impersonation


** Also as there is not a connection string specified, it is likely using Windows NTLM to authenticate


 


Perhaps trying using a connection string similar to the documentation below:


 


https://www.k2.com/onlinehelp/k2blackpearl/devref/current/default.htm#Working_with_a_Process.html%3FTocPath%3DRuntime%2520APIs%2520and%2520Services%7CWorkflow%7CWorkflow%2520Client%2520API%7CWorkflow%2520Client%2520API%2520Samples%7C_____2


 


Or perhaps setting the DisableLoopbackCheck as per:


http://community.k2.com/t5/K2-blackpearl/authentication-problems-24404/td-p/60023


 


Are you attempting to connect with .Net web application (in which case Application Pool Account may play a role) or .Net console/application (current executing user)?


Reply