System.Exception: Invalid archive type error on GetWorklist


I'm running BlackPearl with a background service that polls the K2 server with a GetWorklist method to retrieve likely candidates. The experience I'm having is that it occassionally throws the following partial exception:

threw an exception:[System.Exception: Invalid archive type
   at SourceCode.Workflow.Runtime.ArchiveX.GetInt32()
   at SourceCode.Workflow.Client.Worklist.LoadServer(ArchiveX ar)
   at SourceCode.Workflow.Client.Worklist.Open(WorklistCriteria wc)
   at SourceCode.Workflow.Client.Connection.OpenWorklist(WorklistCriteria Criteria)

What does this mean?


0 Kudos
1 Reply

Re: System.Exception: Invalid archive type error on GetWorklist


Most of the time an "Invalid Archive Type" error is thrown when the DLL version of your SourceCode.Workflow.Client DLL is different from the version of K2 that is installed on your server. Ensure that you always copy the SourceCode.Workflow.Client DLL to your custom application and that you re-reference and rebuild your application with the latest DLL.

In other circumstances you might get this error if something is interfering with the communication or the connection is made to an incorrect port. Make sure there is nothing else also running on port 5252 which might be interfering with the communication.

Hope this helps!