I am trying to build an application that uses workflow on a server and a client. I want to use WCF in the middle to handle messaging. I need to establish 2 way communication between the client and the server. I used the Expense Report sample as a bases but when I try to hook to an event on the service using remoting I get an error. Saying that the application is not flagged as serialized. Can any one help

2 way Communication
jtf01
Hello Argueta,
Make sure you are passing sender parameter as NULL when raising event to workflow from your communication service object.
You might have code similar to:
if (OnEvent != null)
OnEvent(null, new ExternalDataEventArgs(workflowInstanceId));
HTH
Edmundas
cokert
vpopadic
DMartin
This is the error I get. All my object are mark as serializable.
Type 'IntegratedSpace.Multimedia.MediaPlayerApplication' in Assembly 'MediaPlayer, Version=1.0.2284.36321, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Joel Martinez
I don't have a solution for you, but I am experiencing a similar problem (somewhat similar, I think, anyway).
Specifically the exception is thrown when I try to raise the event into the workflow and the details of the exception are "EventArgs not serializable" and an inner exception babling about how the main form in the application is not serializable
Another item of interest is that I can use this same mechanism (the same host service class and methods etc.) without any problems from a console application; I only started getting this when I tried to put together a windows forms app to show the client...
Any help out there
thanx in advance -- /chris
Chike
So it seems that you try to pass an instance of that type and that type is as the error says not serializable. Do not pass this object, pass a data structure instead with the data you need.
Demonica
I cannot guess what your program looks like from the information you provided here, but this kind of error could also happen if you have an instance of the non serializable class in the workflow itself and the workflow tries to get persisted, e.g. because it idles or waits for an event (if you have a persistence service registered to the WorkflowRuntime).
Probably you can provide more information how your program is structured and where the instance of that class is that you get the error on.
Nataraj S. Narayana
I do not get an error when invoking the event. Infact the event on the server fires fine. However, on the client when adding the event handler I get an error.