Visual Studio 2005 Web Form

  • 25 October 2006
  • 2 replies
  • 0 views

Badge +2
Hi there,

I am trying to kick off a new process using Visual Studio 2005 web forms.
I am signed in as administrator and have full permission on the process.

My page has 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("IRWORKFLOWInformationRequest");

// map the data to the K2 process data fields
processInstance.DataFields["Contributors"].Value = partGroupContributors.GetParticipantString();

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

I receive an error on the following line:
processInstance = k2Conn.CreateProcessInstance("IRWORKFLOWInformationRequest");

I triple checked the spelling of the process name to be sure that it is not a spelling error.

The error I m receiving is as follows (straight out of the event viewer):
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2006-10-24 10:52:23
Event time (UTC): 2006-10-24 17:52:23
Event ID: 959c2128ccda4635a95e5206eca1bd1b
Event sequence: 13
Event occurrence: 2
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/RateCaseWorkflow-8-128061853925301760
Trust level: Full
Application Virtual Path: /RateCaseWorkflow
Application Path: ...WebsiteIRWorkflowIRWorkflow
Machine name: K2DEV01

Process information:
Process ID: 3752
Process name: w3wp.exe
Account name: K2DEVDEVsvcWssAppPool

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

Request information:
Request URL: http://k2dev01/.../IREnterNew.aspx
Request path: /.../IREnterNew.aspx

User host address: 192.168.10.183
User: K2DEVAdministrator
Is authenticated: True
Authentication Type: NTLM
Thread account name: K2DEVDEVsvcWssAppPool

Thread information:
Thread ID: 1
Thread account name: K2DEVDEVsvcWssAppPool
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 ...WebsiteIRWorkflowIRWorkflowIREnterNew.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.

Any help would be much appreciated.

2 replies

Badge +11
Any errors in K2Error.txt or ADUMError.txt?

Regards,
Ockert
Badge +2
Thanks for the advice Ockert. I have resolved this issue by opening the K2.net 2003 Server and trying to kick off the process again. I noticed that there was an error listed refering to the fact that the K2 Evaluation Licence had expired. I contacted K2 and reveived a new key and everything works fine now.

Another clue that should have tipped me off was that the service was failing to start when the server was rebooted.

Reply