I am new to Azure Service Fabric, and still in learning mode. I was following a sample course to create an Ecommerce application, which consists of a ProductCatalog Service and a Web API service. The Web API is supposed to be used by clients. The Web API exposes an API call to get all products. Internally the API calls the ProductCatalog service, which has a hard-coded list of products. Those are returned by the ProductCatalog service. The API service and ProductCatalog Services are microservices. Internal services call using .NET Remoting. Both API and the ProductCatalog service are using the same version of .NET remoting. The problem is instead of the API giving the list of products, it is giving me the below error:
Element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' contains data from a type that maps to the name 'urn:ServiceFabric.Communication:ServiceResponseMessageHeaders'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver if you are using DataContractSerializer or add the type corresponding to 'ServiceResponseMessageHeaders' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to the serializer.
I am currently struggling at this point to go forward. Why am I getting this error, and how can I get rid of it?
You are probably communicating via remoting using a V1 client to a V2 service or vice versa. See the docs on how to use the V2 stack.