WCF charset=utf-8 of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8)

后端 未结 5 643
误落风尘
误落风尘 2020-12-06 00:09

I\'m hosting a WCF service in IIS 7.5 using .NET 4.0. I also have a WPF application that I am using as my client that was built with Visual Studio 2010 and .NET 4.0. I add

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 00:42

    in my case same error was caused by missing

    [datacontract] 
    [datamember]
    

    attributes in returned data type.

    Error message was really misleading.

提交回复
热议问题