Tuesday, November 14, 2006

K2.Net 2003 Server Evaluation Expired

A couple of weeks ago while developing a K2.Net 2003 workflow solution the application stopped working. My application kicked off a new process using Visual Studio 2005 web forms.

My web page had a submit button with the following code:
protected void Submit(object sender, EventArgs e)
{
// declare K2 variables
SourceCode.K2ROM.Connection k2Conn = new SourceCode.K2ROM.Connection();
SourceCode.K2ROM.ProcessInstance processInstance;

// instantiate K2 objects
k2Conn.Open(ConfigurationManager.AppSettings["K2ServerName"]);
processInstance = k2Conn.CreateProcessInstance("K2ProjectName\\K2ProcessName");

// map the data to the K2 process data fields
processInstance.DataFields["DataFieldName"].Value = textBox1.Text;

// start K2 process and close the connection
k2Conn.StartProcessInstance(processInstance);
k2Conn.Close();
}


The following line threw the error:
processInstance = k2Conn.CreateProcessInstance( "
K2ProjectName\\K2ProcessName");

In the Event Log I found the following error:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2006-10-20 10:52:23
Event time (UTC): 2006-10-20 17:52:23
Event ID: 959c2128ccda4635a95e5206eca1bd1b
Event sequence: 13
Event occurrence: 2
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/xxxxxxxxxx-8-128061853925301760
Trust level: Full
Application Virtual Path: /xxxxxxxxxxxx
Application Path: ...\Website\MyWebsiteMachine name: k2server

Process information:
Process ID: 3752
Process name: w3wp.exe
Account name: k2server\DEVsvcWssAppPool

Exception information:
Exception type: Exception
Exception message: Exception has been thrown by the target of an invocation.

Request information:
Request URL: http://k2server/.../MyPage.aspx
Request path: /.../MyPage.aspx

User host address: xxx.xxx.xx.xxx
User:
k2server\Administrator
Is authenticated: True
Authentication Type: NTLM
Thread account name: k2server\DEVsvcWssAppPool

Thread information:
Thread ID: 1
Thread account name: k2server\DEVsvcWssAppPool
Is impersonating: False
Stack trace: at Client.Throw(String s, Exception e)
at Client.InternalCall(UInt32 sock, ArchiveX ar, Int32 hdr)
at SourceCode.K2ROM.Connection.CreateProcessInstance(String ProcName, Int32 Version)
at SourceCode.K2ROM.Connection.CreateProcessInstance(String ProcName)
at IRWorkflow.IREnterNew.Submit(Object sender, EventArgs e) in ...\Website\MyWebsite\MyPage.aspx.cs:line 40
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


At first I thought that I had some sort of security/permission issue. After checking all the security/permission configuration I decided to start the K2.Net Console Server and try again. As the K2.Net Server started I noticed the following line in the console:

"K2.net Evaluation Version has expired on 20 Oct 06"

After contacting K2 and getting an extension on the evaluation version the error was resolved.

0 Comments:

Post a Comment

<< Home