The constructor to deserialize an object of type '...' was not found

D

Dan Holmes

I get this error after the server has finished but before the client
call returns. I don't know what else to try. I have been (re)writing
this all day.

'create remoted object
Dim sm As ISystemMessage = IAFClassFactory.Create(Of ISystemMessage)()

'this line causes the error
Dim sms As SystemMessageDataCollection = sm.List(id, "", Nothing,
Nothing, False)

'
public interface ISystemMessage
{
SystemMessageDataCollection List(Identity id, String whseID,
Nullable<DateTime> startdate, Nullable<DateTime> enddate, Boolean
unReadOnly);

...
}

[Serializable]
public class SystemMessageDataCollection :
System.Collections.Generic.Dictionary<String, ISystemMessageData> { }
[Serializable]
public class SystemMessageData : IVS.Framework.ISystemMessageData
 
D

Dan Holmes

Dan said:
I get this error after the server has finished but before the client
call returns. I don't know what else to try. I have been (re)writing
this all day.

[Serializable]
public class SystemMessageDataCollection :
System.Collections.Generic.Dictionary<String, ISystemMessageData> { }
[Serializable]
public class SystemMessageData : IVS.Framework.ISystemMessageData

I found the problem. I needed a different constructor for the
SystemMessageDataCollection object.

Now i am putting ~8400 things in this collection. It takes ~15 seconds
to return from the server. I did a similar test with a dataset and the
time was ~2 seconds. Is there anything i can do to speed up the
serialization-transfer-deserialization?

I also timed passing the dataset and building the object on the client.
That too was significantly faster than the
serialization/deserialization of the remoted object.

dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top