Exception has been thrown by the target of an invocation

  • 28 December 2007
  • 1 reply
  • 8 views

Badge +2

Hello All,


The following error occuring while creating a process instance,


here is my code:


private

string strK2Server = ConfigurationManager.AppSettings["PlanServer"].ToString();

private string strProcessName = System.Configuration.ConfigurationManager.AppSettings["ProjectName"] + Practise;

 


Here "Practise" is my K2 process name 


protected

void Button1_Click(object sender, EventArgs e)


{


Connection oK2Connection = new Connection();


oK2Connection.Open(strK2Server,

"[;];Authenication=Windows;Domain=scsdomhyd01.in;User=kishorek;Password=kishore001");


ProcessInstance oProcInst = oK2Connection.CreateProcessInstance(strProcessName);



oProcInst.Folio = "Manager Approval";


oProcInst.DataFields["Full Name"].Value = TextBox1.Text;


oProcInst.DataFields["Email"].Value = TextBox2.Text;


oProcInst.DataFields["Destination"].Value = DropDownList1.SelectedItem.Value;


oK2Connection.StartProcessInstance(oProcInst);

}


please give me the solution for this.


 


Thankyou


1 reply

Badge +7

Hi,


This error could occur if your K2 Licence has expired.


Best Regards.

Reply