WCF Service Proxy throws exception when more than one parameter is used in [OperationContract] method

后端 未结 4 1059
忘了有多久
忘了有多久 2020-12-10 06:12

I have a WebServiceHost that is being used to host some web services in a console app. I added a service reference to it in my client app and create the proxy like so:

4条回答
  •  隐瞒了意图╮
    2020-12-10 06:42

    It seems you have created Proxy code using Add Service Reference dialog in VS. VS ASR dialog doesn't support WCF REST fully, so, the proxy code is missing [WebInvoke] attribute. Can you try adding [WebInvoke(BodyStyle = WebMessageBodyStyle.Wrapped)] attribute on operations in client proxy?

提交回复
热议问题