callback function cannot accept object as a parameter
I found if I defined callback method like
void call(object o)
I will received the following error
Unhandled Exception: System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.Se开发者_StackOverflow社区rviceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
if using
void call(string s)
then it is good. Anyone knows the reason.
Yes you can't use object
type. Operations (including callbacks) always have to know exact type of parameter otherwise they are not able to perform serialization and deserialization.
精彩评论