Operation not supported in the WCF Test Client

前端 未结 4 690
没有蜡笔的小新
没有蜡笔的小新 2021-01-18 13:01

I created a WCF service and to the default service I added another operation contract on the main DataContract:

[OperationContract]
void DoSomething(UserData         


        
4条回答
  •  醉梦人生
    2021-01-18 13:37

    OK, having gone through the whole thing (thanks to all for the tips) the solution was this:

    • IsReference attribute in DataContract was not needed at all
    • IsOneWay attribute in DataContract was not needed at all even when OperationContract was returning void.
    • KnownType was also not needed provided all the subtypes in the hierarchy were mine, in other words defined by me rather than .NET and marked with DataContract or DataMember as appropriate
    • Getting rid of OperatingSystem and building a wrapper DataContract that extracted the necesary information from OperatingSystem got around the issue.

    Now there is no error in the WCF Test Client

提交回复
热议问题