Sujeet Suman

Sujeet Suman

  • 387
  • 4.1k
  • 1.5m

How to stop a delegate to be serialized in WCF?

May 1 2017 12:33 AM
How to stop a delegate to be serialized in WCF.
 
My code is like below:
public delegate void ClientCallback(CommonContracts.IEventData a_ErrorData); 
 
 
 
I would like to do this because i am getting below error:
<Message>There was an error while trying to serialize parameter http://tempuri.org/:GetDriveResult. The InnerException message was 'Type 'System.DelegateSerializationHolder+DelegateEntry' with data contract name 'DelegateSerializationHolder.DelegateEntry:http://schemas.datacontract.org/2004/07/System' is not expected.
Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'.
Please see InnerException for more details.
</Message>
 
Can any body help me here? 

Answers (1)