Hi,
Anyone have idea to load K2 5 kprx into PersistableObject?
I have try to get a PersistableOject using "Load" method of SourceCode.Framework.SerializationInfoProvider with memory Stream of K2 Five kprx. see below source code.
static void Main(stringr] args){ byteb] x = GetProcessSource(@"C:Usersk2adminDocumentsK2 5 kprxKprxUpdateSubSiteByGetRefProcess_K2Five.kprx");using (var serializer = new SerializationInfoProvider()) using (var stream = new MemoryStream(x)) { if (stream != null) { PersistableObject pot =(PersistableObject)serializer.Load(stream); } }} public static byteb] GetProcessSource(string fileName) { try { // Read the file as byte byteb] kprxBytes = File.ReadAllBytes(fileName); // Return the KPRX bytes return kprxBytes; } catch { throw; } }
I am getting following Exception on
PersistableObject pot =(PersistableObject)serializer.Load(stream);
above line.
Exception : "Exception has been thrown by the target of an invocation."
Note : Above Sourcecode is successfully works for K2 4.7 kprx. but not working for K2 5 kprx.
Any one have Idea regarding this?
Thanks & Best regards
Kajan