I'm having a problem with a WCF call where [ServiceKnownType] is required.
the relevant service contract has
[ServiceKnownType(typeof(List<Object))]
But when I make a call to it, I get ArrayOfanyType is not expected and advice to use the ServiceKnownType or DataContractResolved.
In order to pass the list I have to open Reference.cs on the client side and change:
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(object[]))]
to
using System;
using System.Collections.Generic;
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(List<object>))]
Which begs the question
how or why does service entry
[ServiceKnownType(typeof(List<Object>))]
become client entry
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(object[]))]
and what can be done to prevent this?